Comments (5)
For one application we'd prefer they be at debug level and with a different format that includes more information
Have you tried compile time purging? It's hard to make everyone agree on what should be the correct log level. From my perspective, the above info is quite useful for debugging, so don't think we can disable it by default
with a different format that includes more information. Would adding an after_enqueued hook be an appropriate addition to the middleware behavior? Or is a lighter weight approach preferred?
I would prefer a telemetry event for these cases if necessary. after_failed hook actually exposes most of the info. Let me know what info is missing there
from exq.
Thank you for the rapid response. I agree in general, my point was that whether that is debug or info level is application dependent.
Agree the telemetry approach is better than another middleware stage, but don't see how to use the current telemetry or middleware for this, since theoretically the retry could be enqueued but then after_failed
not be called. Is this too pedantic?
from exq.
but don't see how to use the current telemetry
I meant, a new telemetry event could be added if the after_failed is not suitable for your case. Let me know what information you want to log
since theoretically the retry could be enqueued but then after_failed not be called. Is this too pedantic?
after_failed will be called after any job failure. Exq.Redis.JobQueue.dead?/1 can be used to figure out whether the job is dead (which means no further retry) or not. Though, some info like when it is scheduled (offset seconds) might not be available at the middleware level.
If you mean, after logging it could fail, I think it's hard to handle those kind of cases :), since the log is going to stdout and enqueue is going to redis and I don't think we can make then atomic :)
my point was that whether that is debug or info level is application dependent.
agree, don't see any good solution other than configuring log_level for each case, which is quite cumbersome.
from exq.
Sorry for the delay. My preference would be a new telemetry event.
- We'd like to log the delay for the retry. Due to fuzzing in our backoff, we can't know this from the after_failed
- It still makes me itch to log "enqueued for retry" in the after_failed, as we're making an assumption that this happened or will happen or is happening based our our expectation of the implementation somewhere else.
A telemetry event feels much more correct for this case and for Logger.info("Max retries on job #{job.jid} exceeded")
. Job Retry and Job Death both feel like first class "events" of Exq.
from exq.
It might be nice if there was metadata available in the [:exq, :job, :stop]
event that would indicate if the job is being retried.
from exq.
Related Issues (20)
- Order of middleware execution HOT 1
- Busy Tab is not working HOT 2
- Busy Tab is not working
- no function clause matching in Exq.Manager.Server.handle_call/3 HOT 2
- `Exq.enqueue_in` doesn't work in `mode: [:enqueuer, :api]` HOT 3
- Exq vs Oban? HOT 1
- Redis 6.0 ACL is supported ? HOT 1
- Dynamic subscription enqueued workers never run HOT 2
- [Question] How do I get job score? HOT 3
- expected :timeout to be an integer of :infinity, got: nil HOT 5
- Unique jobs feature is not working HOT 2
- expected :timeout to be an integer of :infinity HOT 2
- Feature Request: enqueue a batch of jobs atomically HOT 3
- Missing assign `:worker_module` HOT 2
- How many queues can I create? HOT 10
- How to configure Exq to push jobs to Sidekiq? HOT 2
- RPOPLPUSH not supported when use envoy as a proxy HOT 3
- Enqueue dependent jobs HOT 2
- :fake mode does not respect uniqueness settings HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exq.