collectiveidea / delayed_job_active_record

ActiveRecord backend integration for DelayedJob 3.0+
MIT License
343 stars 337 forks source link

How does max_attempts interface with ActiveJob retry_on method? #210

Closed jeremygottfried closed 1 month ago

jeremygottfried commented 1 year ago

https://apidock.com/rails/v6.1.3.1/ActiveJob/Exceptions/ClassMethods/retry_on

The ActiveJob retry_on hook allows you to customize how you respond to specific errors, but it's unclear how that integrates with max_attempts in this gem. Does this gem keep a separate queue and ignore ActiveJob behavior, or is max_attempts just setting a global retry_on to catch all errors?

(sorry I made this issue on the main repo and then realized this would be a better place)

albus522 commented 1 month ago

retry_on bypasses delayed_job. ActiveJob enqueues a new job and makes the original job look successful to DJ.