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
#each, #fetch, #find_job, #schedule
Methods inherited from SortedSet
Constructor Details
#initialize ⇒ RetrySet
Returns a new instance of RetrySet.
763 764 765 |
# File 'lib/sidekiq/api.rb', line 763 def initialize super "retry" end |
Instance Method Details
#kill_all ⇒ Object
Kills all jobs pending within the retry set.
773 774 775 |
# File 'lib/sidekiq/api.rb', line 773 def kill_all each(&:kill) while size > 0 end |
#retry_all ⇒ Object
Enqueues all jobs pending within the retry set.
768 769 770 |
# File 'lib/sidekiq/api.rb', line 768 def retry_all each(&:retry) while size > 0 end |