class Sidekiq::RetrySet

The set of retries within Sidekiq. Based on this, you can search/filter for jobs. Here's an example where I'm selecting all jobs of a certain type and deleting them from the retry queue.

r = Sidekiq::RetrySet.new
r.select do |retri|
  retri.klass == 'Sidekiq::Extensions::DelayedClass' &&
  retri.args[0] == 'User' &&
  retri.args[1] == 'setup_new_subscriber'
end.map(&:delete)

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/sidekiq/api.rb, line 820
def initialize
  super "retry"
end

Public Instance Methods

kill_all() click to toggle source

Kills all jobs pending within the retry set.

# File lib/sidekiq/api.rb, line 830
def kill_all
  each(&:kill) while size > 0
end
retry_all() click to toggle source

Enqueues all jobs pending within the retry set.

# File lib/sidekiq/api.rb, line 825
def retry_all
  each(&:retry) while size > 0
end