Method: NewRelic::Agent::PipeService#initialize
- Defined in:
- lib/new_relic/agent/pipe_service.rb
permalink #initialize(channel_id) ⇒ PipeService
Returns a new instance of PipeService.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/new_relic/agent/pipe_service.rb', line 11 def initialize(channel_id) @channel_id = channel_id @collector = NewRelic::Control::Server.new({name: 'parent', port: 0}) @pipe = NewRelic::Agent::PipeChannelManager.channels[@channel_id] if @pipe && @pipe.parent_pid != $$ @pipe.after_fork_in_child else NewRelic::Agent.logger.error('No communication channel to parent process, please see https://docs.newrelic.com/docs/apm/agents/ruby-agent/background-jobs/resque-instrumentation/ for more information.') end end |