Skip to content

Commit

Permalink
Logging within signal handlers is weird
Browse files Browse the repository at this point in the history
  • Loading branch information
albus522 committed Sep 24, 2014
1 parent afeeef5 commit 293fa6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/delayed/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 293fa6c

Please sign in to comment.