Class: Sidekiq::RetrySet
Overview
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.
See the API wiki page for usage notes and examples.
Instance Attribute Summary
Attributes inherited from SortedSet
Instance Method Summary collapse
-
#initialize ⇒ RetrySet
constructor
A new instance of RetrySet.
-
#kill_all ⇒ Object
Kills all jobs pending within the retry set.
-
#retry_all ⇒ Object
Enqueues all jobs pending within the retry set.
Methods inherited from JobSet
#delete_by_jid, #delete_by_value, #each, #fetch, #find_job, #schedule
Methods inherited from SortedSet
#as_json, #clear, #scan, #size
Constructor Details
#initialize ⇒ RetrySet
Returns a new instance of RetrySet.
789 790 791 |
# File 'lib/sidekiq/api.rb', line 789 def initialize super("retry") end |
Instance Method Details
#kill_all ⇒ Object
Kills all jobs pending within the retry set.
799 800 801 |
# File 'lib/sidekiq/api.rb', line 799 def kill_all each(&:kill) while size > 0 end |
#retry_all ⇒ Object
Enqueues all jobs pending within the retry set.
794 795 796 |
# File 'lib/sidekiq/api.rb', line 794 def retry_all each(&:retry) while size > 0 end |