Class: SidekiqUniqueJobs::QueueLockTimeoutCalculator

Inherits:
TimeoutCalculator show all
Defined in:
lib/sidekiq_unique_jobs/timeout_calculator.rb

Instance Method Summary collapse

Methods inherited from TimeoutCalculator

for_item, #initialize, #time_until_scheduled, #worker_class, #worker_class_queue_lock_expiration, #worker_class_run_lock_expiration

Constructor Details

This class inherits a constructor from SidekiqUniqueJobs::TimeoutCalculator

Instance Method Details

#queue_lock_expirationObject


59
60
61
62
63
64
65
# File 'lib/sidekiq_unique_jobs/timeout_calculator.rb', line 59

def queue_lock_expiration
  @queue_lock_expiration ||=
    (
      worker_class_queue_lock_expiration ||
      SidekiqUniqueJobs.config.default_queue_lock_expiration
    ).to_i
end

#secondsObject


55
56
57
# File 'lib/sidekiq_unique_jobs/timeout_calculator.rb', line 55

def seconds
  queue_lock_expiration + time_until_scheduled
end