JP Camara @jpcamara.com · Dec 19

In Sidekiq, you can add a special method to your job class called `sidekiq_retry_in`. This method allows you to dynamically adjust retry behavior. For instance, based on the exception raised you can return a different duration in seconds. /1

12 likes 2 replies

?

Replies

Jake Camara · Dec 20

Your mom can dynamically adjust retry behavior.

JP Camara · Dec 19

TIL if you want to return the duration in seconds, returning it as an Integer is a _hard_ requirement There is a _specific_ check that the class is Integer. If you accidentally return a float, Sidekiq ignores it and reverts to its built-in delay policy. Be careful!