Skip to content

Instantly share code, notes, and snippets.

Last active February 19, 2024 04:31
Star You must be signed in to star a gist
Save wbotelhos/fb865fba2b4f3518c8e533c7487d5354 to your computer and use it in GitHub Desktop.
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
# 2. Clear scheduled jobs
# 3. Clear 'Processed' and 'Failed' jobs
# 3. Clear 'Dead' jobs statistics
# Stats
stats =
# {"production_mailers"=>25, "production_default"=>1}
# Queue
queue ='queue_name')
queue.each { |job| job.item } # hash content
# Redis Acess
Sidekiq.redis { |redis| redis.keys }
# ["stat:queues"...
Copy link

thank you !

Copy link

It was very helpful. Thanks a a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment