lib/new_relic/agent/agent.rb in newrelic_rpm-7.0.0 vs lib/new_relic/agent/agent.rb in newrelic_rpm-7.1.0
- old
+ new
@@ -15,10 +15,11 @@
require 'new_relic/agent/hostname'
require 'new_relic/agent/new_relic_service'
require 'new_relic/agent/pipe_service'
require 'new_relic/agent/configuration/manager'
require 'new_relic/agent/database'
+require 'new_relic/agent/instrumentation/resque/helper'
require 'new_relic/agent/commands/agent_command_router'
require 'new_relic/agent/event_listener'
require 'new_relic/agent/distributed_tracing'
require 'new_relic/agent/monitors'
require 'new_relic/agent/transaction_event_recorder'
@@ -468,10 +469,10 @@
# Return true if we're using resque and it hasn't had a chance to (potentially)
# daemonize itself. This avoids hanging when there's a Thread started
# before Resque calls Process.daemon (Jira RUBY-857)
def defer_for_resque?
NewRelic::Agent.config[:dispatcher] == :resque &&
- NewRelic::LanguageSupport.can_fork? &&
+ NewRelic::Agent::Instrumentation::Resque::Helper.resque_fork_per_job? &&
!PipeChannelManager.listener.started?
end
def in_resque_child_process?
defined?(@service) && @service.is_a?(PipeService)