Question

I'm calling the Sidekiq delay on a class method like:

Class.delay.some_method()

This works well except when there are errors because I cannot set the retries to false. Any advice on this?

The documentation shows retries for non-class methods (worker): https://github.com/mperham/sidekiq/wiki/Error-Handling

How do I set the retries to false for a class method without needing to convert it to a worker?

Was it helpful?

Solution

You can actually do this

Class.delay(:retry => false).some_method()

Documentation here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top