Alternative job in case of failure

14 views
Skip to first unread message

jdeel

unread,
Feb 2, 2017, 12:30:10 PM2/2/17
to Sidekiq
Is it possible to configure Sidekiq to run an alternative job in case of a job's failure?
I know that I could write some code to tackle this eventuality.
However I wonder if there is any chance to configure Sidekiq to switch to an alternative job in case of failure, in case writing more code would give a too complicated result.
Sidekiq may already be configured to run the original job many times, say any 10 minutes from 6 am to 8 am, hoping that what prevents the job from succeeding the first or the second time is not more an issue the next time (say a not available url). However it may happen that all the attempts fail. In this case, it might be useful to switch to an alternative task.

Abhi Rao

unread,
Feb 2, 2017, 1:54:31 PM2/2/17
to Sidekiq
Checkout the sidekiq_retries_exhausted hook. https://github.com/mperham/sidekiq/wiki/Error-Handling
I believe you could push another job in there.


-Abhi Rao

--
You received this message because you are subscribed to the Google Groups "Sidekiq" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sidekiq+u...@googlegroups.com.
To post to this group, send email to sid...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sidekiq/1426b030-7ea2-4b34-bcee-40687e675eed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages