Sha256: 4fb64be57b7a83621f9e29ab67c267c726daec531f27aabf7a21a820c61e1740
Contents?: true
Size: 962 Bytes
Versions: 40
Compression:
Stored size: 962 Bytes
Contents
module AgentHooks # Used post fork to re-initialize state and restart communications with # the host agent. # def after_fork ::Instana.logger.debug "after_fork hook called. Falling back to unannounced state and spawning a new background agent thread." @timers.cancel # Reseed the random number generator for this # new thread. srand transition_to(:unannounced) setup spawn_background_thread end def before_resque_fork ::Instana.logger.debug "before_resque_fork hook called. pid/ppid: #{Process.pid}/#{Process.ppid}" @is_resque_worker = true end def after_resque_fork ::Instana.logger.debug "after_resque_fork hook called. pid/ppid: #{Process.pid}/#{Process.ppid}" @timers.cancel # Reseed the random number generator for this # new thread. srand ::Instana.config[:metrics][:enabled] = false @process[:pid] = Process.pid setup spawn_background_thread end end
Version data entries
40 entries across 40 versions & 1 rubygems