I ran into a bug at work where the same job was being run multiple times (sending out emails to users). So I did some testing and came up with a minimal reproduction of the problem here: https://github.com/hqmq/sidekiq-not-unique-jobs
In order to run it just bundle install and then in one terminal start sidekiq like normal:
$ bundle exec sidekiq -r config/bootstrap.rb
Then in a second terminal run:
$ ruby test_uniqueness.rb
2014-02-26T21:50:12Z 67772 TID-znnu9k INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379", :namespace=>"sk"}
Expecting the counter to = 1
counter = 9
I ran into a bug at work where the same job was being run multiple times (sending out emails to users). So I did some testing and came up with a minimal reproduction of the problem here: https://github.com/hqmq/sidekiq-not-unique-jobs
In order to run it just bundle install and then in one terminal start sidekiq like normal:
$ bundle exec sidekiq -r config/bootstrap.rbThen in a second terminal run:
$ ruby test_uniqueness.rb 2014-02-26T21:50:12Z 67772 TID-znnu9k INFO: Sidekiq client with redis options {:url=>"redis://localhost:6379", :namespace=>"sk"} Expecting the counter to = 1 counter = 9