Class: StandardHealth::Checks::SolidCable

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

Overview

Verifies the SolidCable / ActionCable backing store is reachable.

SolidCable persists messages in solid_cable_messages. The probe is a bounded read against that table, which confirms both that the cable schema is migrated and that the connection it lives on is up.

Promoted from sidekick-web's SolidCableCheck, which was one of four host-local copies of a check the gem should have shipped.

NOT REGISTERED AUTOMATICALLY. Registering it would be a behaviour change on bundle update: every host without SolidCable installed — or with the table not yet migrated — would start reporting a failing check, turning the aggregate tier yellow across the estate for a check nobody asked for. New checks in this gem are opt-in for that reason.

c.register_check :solid_cable, StandardHealth::Checks::SolidCable

NON-CRITICAL BY DEFAULT, deliberately: cable is a degradable feature dependency. A broken cable store should mark the app degraded, never pull an instance out of rotation — so prefer this on the AGGREGATE tier rather than in readiness.

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_cable, critical: false) ⇒ SolidCable

Returns a new instance of SolidCable.



29
30
31
# File 'lib/standard_health/checks/solid_cable.rb', line 29

def initialize(name: :solid_cable, critical: false)
  super
end

Instance Method Details

#runObject



33
34
35
36
37
# File 'lib/standard_health/checks/solid_cable.rb', line 33

def run
  with_timing do
    connection.select_value("SELECT 1 FROM solid_cable_messages LIMIT 1")
  end
end