Skip to content

:until_and_while_executing not processing queued jobs after executing #355

@glister

Description

@glister

Describe the bug
Job takes ~15 seconds to complete

  1. T-0 - Queue job with params ABC
  2. T-5s - Queue job with params ABC
  3. 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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions