diff --git a/lib/delayed/worker.rb b/lib/delayed/worker.rb index 0fbd4adc0..fbdd92ac4 100644 --- a/lib/delayed/worker.rb +++ b/lib/delayed/worker.rb @@ -132,13 +132,13 @@ def name def start # rubocop:disable CyclomaticComplexity, PerceivedComplexity trap('TERM') do - say 'Exiting...' + Thread.new { say 'Exiting...' } stop raise SignalException, 'TERM' if self.class.raise_signal_exceptions end trap('INT') do - say 'Exiting...' + Thread.new { say 'Exiting...' } stop raise SignalException, 'INT' if self.class.raise_signal_exceptions && self.class.raise_signal_exceptions != :term end