Last active
September 11, 2023 15:16
-
-
Save apeckham/005436cb361bf1b17855 to your computer and use it in GitHub Desktop.
sidekiq: delete all jobs of a certain class/worker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sidekiq::Stats.new.queues.each { |queue_name, _| Sidekiq::Queue.new(queue_name).each { |j| j.delete if j.klass == 'MyWorker' } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment