Class: Sidekiq::ReliableJob::Enqueuer
- Inherits:
-
Object
- Object
- Sidekiq::ReliableJob::Enqueuer
- Includes:
- Component
- Defined in:
- lib/sidekiq/reliable_job/enqueuer.rb
Overview
Background thread that continuously processes the Outbox.
Constant Summary collapse
- POLL_INTERVAL =
0.1- ERROR_SLEEP =
1- LOCK_RETRY_SLEEP =
20
Instance Method Summary collapse
-
#initialize(config) ⇒ Enqueuer
constructor
A new instance of Enqueuer.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(config) ⇒ Enqueuer
Returns a new instance of Enqueuer.
15 16 17 18 19 |
# File 'lib/sidekiq/reliable_job/enqueuer.rb', line 15 def initialize(config) @config = config @done = false @processor = OutboxProcessor.new end |
Instance Method Details
#start ⇒ Object
21 22 23 |
# File 'lib/sidekiq/reliable_job/enqueuer.rb', line 21 def start @thread = Thread.new { run } end |
#stop ⇒ Object
25 26 27 |
# File 'lib/sidekiq/reliable_job/enqueuer.rb', line 25 def stop @done = true end |