Sha256: 977766dd670024daef66e31d0f9f38f1f4a7f2ffcc0ae5fd3c630d343d1cab72
Contents?: true
Size: 1.27 KB
Versions: 13
Compression:
Stored size: 1.27 KB
Contents
# frozen_string_literal: true module Karafka module Web module Tracking module Consumers module Listeners # Listener needed to start schedulers and other things that we need to collect and report # data. We do not want to start this when code is loaded because it may not be fork # compatible that way class Booting < Base # Starts (if needed) the Web UI tracking scheduler thread that periodically pings # reporters to report needed data (when it is time). # # @param _event [Karafka::Core::Monitoring::Event] def on_app_running(_event) ::Karafka::Web.config.tracking.scheduler.async_call( 'karafka.web.tracking.scheduler' ) end # Updates the web producer after fork if needed and adds ppid to nodes # @param _event [Karafka::Core::Monitoring::Event] def on_swarm_node_after_fork(_event) ::Karafka::Process.tags.add(:node_ppid, "ppid:#{::Process.ppid}") return if Karafka::Web.config.producer == Karafka::App.config.producer Web.config.producer = Karafka::App.config.producer end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems