You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
The second job does not run, even if it has different arguments.... Why is this?
The text was updated successfully, but these errors were encountered: