Describe the bug
Job takes ~15 seconds to complete
- T-0 - Queue job with params
ABC
- T-5s - Queue job with params
ABC
- T-10s - Queue job with params
ABC
Expected behavior
- First job immediately starts
- Second job queues but doesn't start
- Third job doesn't queue
- Second job starts after first job completes
Current behavior
Each job starts as soon as queued, job 1 actually executes and finishes after 15 seconds. Jobs 2 and 3 start but don't execute and never actually execute even after job 1 finishes, they just wait indefinitely.
Worker class
class ContactAssignmentWorker
include Sidekiq::Worker
sidekiq_options :retry => 3, :backtrace => true, lock: :until_and_while_executing, lock_timeout: nil
def perform(contact_provider_id)
#process
end
end
Additional context
Bizarrely if I queue the same job again after job 1 has finished and jobs 2 and 3 are still waiting indefinitely, job 2 starts executing and the new job takes it's place waiting indefinitely
Describe the bug
Job takes ~15 seconds to complete
ABCABCABCExpected behavior
Current behavior
Each job starts as soon as queued, job 1 actually executes and finishes after 15 seconds. Jobs 2 and 3 start but don't execute and never actually execute even after job 1 finishes, they just wait indefinitely.
Worker class
Additional context
Bizarrely if I queue the same job again after job 1 has finished and jobs 2 and 3 are still waiting indefinitely, job 2 starts executing and the new job takes it's place waiting indefinitely