lib/new_relic/agent/harvester.rb in newrelic_rpm-3.8.1.221 vs lib/new_relic/agent/harvester.rb in newrelic_rpm-3.9.0.229
- old
+ new
@@ -21,11 +21,11 @@
events.subscribe(:start_transaction, &method(:on_transaction))
end
end
def on_transaction(*_)
- return unless restart_in_children_enabled? && needs_restart?
+ return unless restart_in_children_enabled? && needs_restart? && harvest_thread_enabled?
needs_thread_start = false
@lock.synchronize do
needs_thread_start = needs_restart?
mark_started
@@ -44,9 +44,13 @@
@starting_pid != pid
end
def restart_in_children_enabled?
NewRelic::Agent.config[:restart_thread_in_children]
+ end
+
+ def harvest_thread_enabled?
+ !NewRelic::Agent.config[:disable_harvest_thread]
end
def restart_harvest_thread
# Daemonize reports thread as still alive when it isn't... whack!
NewRelic::Agent.instance.instance_variable_set(:@worker_thread, nil)