Class: SolidQueueGuard::Checks::Config::ProcessHeartbeatConfigCheck
- Defined in:
- lib/solid_queue_guard/checks/config/process_heartbeat_config_check.rb
Constant Summary collapse
- DEFAULT_HEARTBEAT_INTERVAL =
60.seconds
- DEFAULT_ALIVE_THRESHOLD =
5.minutes
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SolidQueueGuard::Checks::Base
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/solid_queue_guard/checks/config/process_heartbeat_config_check.rb', line 10 def call heartbeat_interval = SolidQueue.process_heartbeat_interval alive_threshold = SolidQueue.process_alive_threshold if heartbeat_interval == DEFAULT_HEARTBEAT_INTERVAL && alive_threshold == DEFAULT_ALIVE_THRESHOLD warn( 'process_heartbeat_config', 'Process heartbeat thresholds use defaults (interval: 60s, alive: 5m)', suggestion: 'Consider customizing process_alive_threshold for your deployment latency requirements' ) else pass( 'process_heartbeat_config', "Process heartbeat interval: #{heartbeat_interval.inspect}, alive threshold: #{alive_threshold.inspect}" ) end end |