Class: StandardHealth::Checks::SolidQueue

Inherits:
StandardHealth::Check show all
Defined in:
lib/standard_health/checks/solid_queue.rb

Overview

Verifies the SolidQueue backing store is reachable.

SolidQueue can be configured to live on a dedicated database connection (‘config.solid_queue.connects_to`). When that’s the case we run the probe against ‘SolidQueue::Record.connection`. Otherwise we fall back to the primary AR connection — which is exactly where the queue tables live in single-DB setups.

Instance Attribute Summary

Attributes inherited from StandardHealth::Check

#critical, #name

Instance Method Summary collapse

Methods inherited from StandardHealth::Check

#critical?, #with_timing

Constructor Details

#initialize(name: :solid_queue, critical: true) ⇒ SolidQueue

Returns a new instance of SolidQueue.



15
16
17
# File 'lib/standard_health/checks/solid_queue.rb', line 15

def initialize(name: :solid_queue, critical: true)
  super
end

Instance Method Details

#runObject



19
20
21
22
23
# File 'lib/standard_health/checks/solid_queue.rb', line 19

def run
  with_timing do
    connection.execute("SELECT 1")
  end
end