Sidekiq: change rate of retry for failed job?

ruby, ruby-on-rails, sidekiq

Solution

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

Problem

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.

Original source