Class: RoundhouseUi::Fetch
- Inherits:
-
Sidekiq::BasicFetch
- Object
- Sidekiq::BasicFetch
- RoundhouseUi::Fetch
- Defined in:
- lib/roundhouse_ui/fetch.rb
Overview
Opt-in fetch strategy that honors RoundhouseUi::Pause. Install it server-side:
# config/initializers/sidekiq.rb
Sidekiq.configure_server do |config|
config[:fetch_class] = RoundhouseUi::Fetch
end
Until this fetcher is active, pausing a queue has no effect — the UI detects that (via the liveness beacon below) and warns rather than pretending.
Inherits all of BasicFetch's behavior (weights, strict ordering, timeouts); we only filter the queue list. BasicFetch#retrieve_work already handles an empty list (sleep + return), so "all queues paused" is safe.
Constant Summary collapse
- BEACON_INTERVAL =
seconds; throttles the liveness write
5
Instance Method Summary collapse
Instance Method Details
#queues_cmd ⇒ Object
21 22 23 24 |
# File 'lib/roundhouse_ui/fetch.rb', line 21 def queues_cmd touch_liveness RoundhouseUi::Pause.reject_paused(super) end |