I have have an issue when using nested workers, where uniqueness is not followed, and leads to duplicate jobs.
When executing RunAJobWorker multiple times it leads to duplicate LongRunningWorker instances.
I am using Sidekiq 2.6.5 and Unique-jobs 2.3.2
Here is the follow code that will reproduce the problem:
class RunAJobWorker
include Sidekiq::Workder
sidekiq_options unique: true
def perform
# Do some db lookup to find params for this
# the job
id = 10
LongRunningWorker.perform_async(id)
end
end
class LongRunningWorker
include Sidekiq::Workder
sidekiq_options unique: true
def perform(id)
# Find model
# model = Model.find(id)
# model long running task
sleep(10)
end
end
I have have an issue when using nested workers, where uniqueness is not followed, and leads to duplicate jobs.
When executing
RunAJobWorkermultiple times it leads to duplicateLongRunningWorkerinstances.I am using Sidekiq 2.6.5 and Unique-jobs 2.3.2
Here is the follow code that will reproduce the problem: