The second job does not run, even if it has different arguments.... Why is this?
# WORKER
class FooWorker
include Sidekiq::Worker
sidekiq_options({
# Mitigates from race conditions Should be set to true (enables uniqueness for async jobs)
unique: :true,
unique_job_expiration: 5.minutes.to_i, # Unique expiration (optional, default is 30 minutes)
unique_args: :unique_args,
retry: false,
backtrace: true
})
def self.unique_args(foo, bar)
[foo, bar]
end
def perform(*args)
sleep(30.seconds)
end
end
# In Rails console
FooWorker.perform_async(4, 4) # => "defa813c6ff16a6b9dba6f6a"
FooWorker.perform_async(5, 5) # nil
The second job does not run, even if it has different arguments.... Why is this?