Skip to content

Instantly share code, notes, and snippets.

@apeckham
Last active September 11, 2023 15:16
Show Gist options
  • Save apeckham/005436cb361bf1b17855 to your computer and use it in GitHub Desktop.
Save apeckham/005436cb361bf1b17855 to your computer and use it in GitHub Desktop.
sidekiq: delete all jobs of a certain class/worker
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