Hi! This project looks very exciting for teams looking to migrate away from delayed_job. However, I find myself having some lingering questions about the idempotency requirement of this gem:
- Rails enqueues a lot of built-in jobs to ActiveJob. Stuff like ActiveStorage and ActionMailer. Are all these built-in jobs already idempotent? Is there something that needs to be done to make them idempotent? Or can
delayed not be used with these jobs?
- Under what circumstances do successful jobs run twice? And what's the time horizon on this? Can a job only be picked up a second time before it's completed? Or is there a window of time after some worker has fully completed the job that it can be picked up again? (This question is motivated by the idea of using Redis as an external locking mechanism to aid with idempotency with e.g., jobs that make external service calls. If a job releases the lock in Redis in
after_perform would there still be a race condition?)
Massive thanks to the team at Betterment for this project!
Hi! This project looks very exciting for teams looking to migrate away from
delayed_job. However, I find myself having some lingering questions about the idempotency requirement of this gem:delayednot be used with these jobs?after_performwould there still be a race condition?)Massive thanks to the team at Betterment for this project!