Last active
November 30, 2023 04:25
-
-
Save keymastervn/f42e3bcd95e8030bacc6b337051942a9 to your computer and use it in GitHub Desktop.
Clean up sidekiq uniq jobs
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
# https://github.com/mhenrixon/sidekiq-unique-jobs/blob/v6.x/lib/sidekiq_unique_jobs/util.rb#L8 | |
SidekiqUniqueJobs::Util.keys("uniquejobs:*") | |
SidekiqUniqueJobs::Util.keys_with_ttl("uniquejobs:*") | |
{ | |
"uniquejobs:5165cb935c16788b6fd647966e255de2:GRABBED" => 586407, | |
"uniquejobs:5165cb935c16788b6fd647966e255de2:EXISTS" => 586407, | |
"uniquejobs:344892e038f09a5535bb5ed5971a4a16:GRABBED" => 599625, | |
"uniquejobs:344892e038f09a5535bb5ed5971a4a16:EXISTS" => 599625 | |
} | |
# delete | |
SidekiqUniqueJobs::Util.del("uniquejobs:*", 100) | |
# or Sidekiq.redis {|conn| conn.del 'uniquejobs:7414112d3a71f6a7e46de42c50b4a868:GRABBED' } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment