diff --git a/lib/datadog/core/remote/worker.rb b/lib/datadog/core/remote/worker.rb index e8be1231f50..86868562ca7 100644 --- a/lib/datadog/core/remote/worker.rb +++ b/lib/datadog/core/remote/worker.rb @@ -19,12 +19,12 @@ def initialize(interval:, &block) @block = block end - def start(allow_restart: false) + def start Datadog.logger.debug { 'remote worker starting' } acquire_lock - if @stop_requested && !allow_restart + if @stop_requested Datadog.logger.debug('remote worker: refusing to restart after previous stop') return end diff --git a/spec/datadog/core/remote/worker_spec.rb b/spec/datadog/core/remote/worker_spec.rb index 040ebd5e586..20cf0f087cd 100644 --- a/spec/datadog/core/remote/worker_spec.rb +++ b/spec/datadog/core/remote/worker_spec.rb @@ -77,18 +77,6 @@ worker.start expect(worker.instance_variable_get(:@started)).to be false end - - context 'when calling start with allow_restart: true' do - it 'restarts the worker after being stopped once' do - worker.start - expect(worker.instance_variable_get(:@started)).to be true - - worker.stop - - worker.start(allow_restart: true) - expect(worker.instance_variable_get(:@started)).to be true - end - end end describe '#stop' do