Class: Sidekiq::ReliableFetch

Inherits:
BaseReliableFetch show all
Defined in:
lib/sidekiq/reliable_fetch.rb

Constant Summary collapse

RELIABLE_FETCH_IDLE_TIMEOUT =

For reliable fetch we don’t use Redis’ blocking operations so we inject a regular sleep into the loop.

5

Constants inherited from BaseReliableFetch

BaseReliableFetch::DEFAULT_CLEANUP_INTERVAL, BaseReliableFetch::DEFAULT_LEASE_INTERVAL, BaseReliableFetch::DEFAULT_MAX_RETRIES_AFTER_INTERRUPTION, BaseReliableFetch::HEARTBEAT_INTERVAL, BaseReliableFetch::HEARTBEAT_LIFESPAN, BaseReliableFetch::HEARTBEAT_RETRY_DELAY, BaseReliableFetch::LEASE_KEY, BaseReliableFetch::LEGACY_WORKING_QUEUE_REGEX, BaseReliableFetch::SCAN_COUNT, BaseReliableFetch::WORKING_QUEUE_PREFIX, BaseReliableFetch::WORKING_QUEUE_REGEX

Instance Attribute Summary collapse

Attributes inherited from BaseReliableFetch

#cleanup_interval, #last_try_to_take_lease_at, #lease_interval, #queues, #strictly_ordered_queues, #use_semi_reliable_fetch

Instance Method Summary collapse

Methods inherited from BaseReliableFetch

#bulk_requeue, heartbeat, heartbeat_key, hostname, identity, process_nonce, #retrieve_work, setup_reliable_fetch!, start_heartbeat_thread, worker_dead?, working_queue_name

Constructor Details

#initialize(options) ⇒ ReliableFetch

Returns a new instance of ReliableFetch.



11
12
13
14
15
16
# File 'lib/sidekiq/reliable_fetch.rb', line 11

def initialize(options)
  super

  @queues = queues.uniq if strictly_ordered_queues
  @queues_size = queues.size
end

Instance Attribute Details

#queues_sizeObject (readonly)

seconds



9
10
11
# File 'lib/sidekiq/reliable_fetch.rb', line 9

def queues_size
  @queues_size
end