Created
January 31, 2014 00:16
-
-
Save apolzon/8722959 to your computer and use it in GitHub Desktop.
Filter some sidekiq jazz
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
enqueued = Sidekiq::Queue.new | |
scheduled = Sidekiq::ScheduledSet.new | |
retries = Sidekiq::RetrySet.new | |
# use whichever queue you expect your job to be in, example is for scheduled: | |
my_jobs = scheduled.map(&:item).select do |job| | |
job["class"] == "Listing::Worker::End" && | |
job["args"].last == 33952 | |
# job["args"] is an array like: | |
# ["Listing", 32] -- [target_class.to_s, id] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment