Created
November 19, 2024 20:49
-
-
Save ridiculous/153a9dddb71eebcbcfe0b093db553f33 to your computer and use it in GitHub Desktop.
Delete jobs from sidekiq redis queue
This file contains hidden or 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
t = [] | |
default_queue = Sidekiq::Queue.all.first | |
default_queue.each do |job| | |
klass = job["args"].first["job_class"] | |
if klass == "ScheduledJob" && job["args"].first["arguments"] == ["unidentified_recipients"] | |
t << job | |
end | |
end | |
t.map(&:delete) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment