I have jobs of a particular type that I'd like to have retry more frequently than set by the default Sidekiq interval. Is this currently possible? Ideally the job would retry every 5 seconds for up to a minute. Not entirely sure this is currently something that's trivial to plugin to a Sidekiq job.
Sidekiq is an open-source framework that provides efficient background processing for Ruby applications. It uses Redis as an in-memory data structure to store all of its job and operational data. It's important to be aware that Sidekiq by default doesn't do scheduling, it only executes jobs.
Sidekiq handles concurrency by using multiple threads in its process. This way, it can process multiple jobs at once, each thread processing one job at a time. By default, Sidekiq uses 10 threads per process. You can configure it to use more threads, thus increasing concurrency.
If you build a web application you should minimize the amount of time spent responding to every user; a fast website means a happy user.
At the same time, Sidekiq uses multithreading so it is much more memory-efficient than Rescue.
According to: https://github.com/mperham/sidekiq/wiki/Error-Handling you can do this:
class Worker
include Sidekiq::Worker
sidekiq_retry_in do |count|
5
end
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With