-
-
Save elainenaomi/505101388e8e3ed4db7a8a0c24b636ba to your computer and use it in GitHub Desktop.
Sidekiq API Reference
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.redis { |conn| conn.flushdb } # clear everything | |
Sidekiq::Queue.all # get all queues | |
Sidekiq::Queue.new # get the "default" queue | |
Sidekiq::Queue.new("mailer") # get the "mailer" queue | |
Sidekiq::Queue.new.clear # deletes all jobs in a queue, by removing the queue | |
Sidekiq::Queue.all.each(&:clear) # deletes all jobs in all queues | |
ss = Sidekiq::ScheduledSet.new | |
ss.size | |
ss.clear | |
jobs = ss.select { |job| job.klass == 'SomeWorker' } | |
jobs.each(&:delete) | |
Sidekiq::RetrySet.new | |
Sidekiq::DeadSet.new | |
Sidekiq::ProcessSet.new # running processes | |
Sidekiq::Stats.new.reset # reset statistics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment