Class: Sidekiq::SemiReliableFetch
- Inherits:
-
BaseReliableFetch
- Object
- BaseReliableFetch
- Sidekiq::SemiReliableFetch
- Defined in:
- lib/sidekiq/semi_reliable_fetch.rb
Constant Summary collapse
- SEMI_RELIABLE_FETCH_TIMEOUT =
We want the fetch operation to timeout every few seconds so the thread can check if the process is shutting down. This constant is only used for semi-reliable fetch.
2
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
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
-
#initialize(options) ⇒ SemiReliableFetch
constructor
seconds.
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) ⇒ SemiReliableFetch
seconds
10 11 12 13 14 15 16 17 |
# File 'lib/sidekiq/semi_reliable_fetch.rb', line 10 def initialize() super if strictly_ordered_queues @queues = @queues.uniq @queues << SEMI_RELIABLE_FETCH_TIMEOUT end end |