Sha256: ad564fde1935586ccfc9174fe4bc42fe380d6aac0e81b2e71c82030add846c32
Contents?: true
Size: 970 Bytes
Versions: 26
Compression:
Stored size: 970 Bytes
Contents
# frozen_string_literal: true module SplitIoClient module Telemetry class SyncTask def initialize(config, telemetry_synchronizer) @config = config @telemetry_synchronizer = telemetry_synchronizer end def call stats_thread PhusionPassenger.on_event(:starting_worker_process) { |forked| stats_thread if forked } if defined?(PhusionPassenger) end private def stats_thread @config.threads[:telemetry_stats_sender] = Thread.new do begin @config.logger.info('Starting Telemetry Sync Task') loop do sleep(@config.telemetry_refresh_rate) @telemetry_synchronizer.synchronize_stats end rescue SplitIoClient::SDKShutdownException @telemetry_synchronizer.synchronize_stats @config.logger.info('Posting Telemetry due to shutdown') end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems