Class: CompletionKit::WorkerHealth
- Inherits:
-
Object
- Object
- CompletionKit::WorkerHealth
- Defined in:
- app/services/completion_kit/worker_health.rb
Constant Summary collapse
- HEARTBEAT_THRESHOLD =
30.seconds
Class Method Summary collapse
Class Method Details
.healthy? ⇒ Boolean
5 6 7 8 |
# File 'app/services/completion_kit/worker_health.rb', line 5 def self.healthy? return true unless defined?(::SolidQueue::Process) ::SolidQueue::Process.where("last_heartbeat_at > ?", HEARTBEAT_THRESHOLD.ago).exists? end |