Sha256: 8ce344d449f970eb85ec29ee3924ef5c3009764fe93e62c937a5f2ba5b1c04cf
Contents?: true
Size: 701 Bytes
Versions: 21
Compression:
Stored size: 701 Bytes
Contents
# frozen_string_literal: true module Sbmt module KafkaConsumer module Instrumentation class ReadinessListener include ListenerHelper include KafkaConsumer::Probes::Probe def initialize setup_subscription end def on_app_running(_event) @ready = true end def on_app_stopping(_event) @ready = false end def probe(_env) ready? ? probe_ok(ready: true) : probe_error(ready: false) end private def ready? @ready end def setup_subscription Karafka::App.monitor.subscribe(self) end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems