Class: SolidQueueGuard::Checks::Config::ProcessHeartbeatConfigCheck
- Defined in:
- lib/solid_queue_guard/checks/config/process_heartbeat_config_check.rb
Overview
Solid Queue prunes any process whose heartbeat is older than process_alive_threshold, releasing the executions it had claimed. A live worker that merely delayed a heartbeat is pruned the same way, so the threshold must leave room for more than one missed beat.
Constant Summary collapse
- DEFAULT_MIN_MARGIN =
2
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SolidQueueGuard::Checks::Base
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/solid_queue_guard/checks/config/process_heartbeat_config_check.rb', line 13 def call return invalid_heartbeat_interval unless heartbeat_interval.positive? return alive_threshold_too_low if alive_threshold <= heartbeat_interval return margin_too_tight if margin < min_margin return guard_threshold_above_alive if stale_process_threshold > alive_threshold healthy_thresholds end |