Skip to content

Instantly share code, notes, and snippets.

@jschee
Created November 13, 2020 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jschee/cb6a1b6eabc725ee09c403df25a91b79 to your computer and use it in GitHub Desktop.
Save jschee/cb6a1b6eabc725ee09c403df25a91b79 to your computer and use it in GitHub Desktop.
clear_queue.rb
## i stash this in rails root folder and run it when i need to clear my sidekiq queues in development.
require 'sidekiq/api'
Sidekiq::Queue.all.each(&:clear)
Sidekiq::RetrySet.new.clear
Sidekiq::ScheduledSet.new.clear
Sidekiq::DeadSet.new.clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment