Class: Textus::Maintenance::Serve
- Inherits:
-
Object
- Object
- Textus::Maintenance::Serve
- Defined in:
- lib/textus/maintenance/serve.rb
Overview
The convergence daemon loop: seed scheduled work (TTL re-pull + sweep), reclaim crashed leases, drain the queue, sleep, repeat. ‘tick` is one iteration (unit-testable); `run` loops forever. Drains serially for the same reason as Drain — each produce job self-locks, so running them in turn keeps the build lock uncontended.
Instance Method Summary collapse
-
#initialize(container:, call:) ⇒ Serve
constructor
A new instance of Serve.
- #run(poll: nil) ⇒ Object
- #tick ⇒ Object
Constructor Details
Instance Method Details
#run(poll: nil) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/textus/maintenance/serve.rb', line 21 def run(poll: nil) interval = poll || @container.manifest.data.worker_config[:poll] loop do tick sleep(interval) end end |