Skip to content

Commit

Permalink
Cleanup logging
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Apr 7, 2021
1 parent 60ccd9a commit 6ab0d17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/delayed/launcher/forking.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def launch
def shutdown(timeout = nil)
@stopped = true
message = " with #{timeout} second grace period" if timeout
logger.info "Shutdown invoked#{message}..."
logger.info "Shutdown invoked#{message}"
signal_workers('TERM')
schedule_kill(timeout) if timeout
end
Expand All @@ -26,7 +26,7 @@ def kill(exit_status = 0, message = nil)
@stopped = true
@killed = true
message = " #{message}" if message
logger.warn "Kill invoked#{message}..."
logger.warn "Kill invoked#{message}"
signal_workers('KILL')
logger.warn "#{parent_name} exited forcefully#{message} - pid #{$$}"
exit(exit_status)
Expand Down Expand Up @@ -111,7 +111,7 @@ def schedule_kill(timeout)

def signal_workers(signal)
workers.each do |pid, (worker_name, _)|
logger.warn "Sending SIG#{signal} to worker #{worker_name}..."
logger.info "Sent SIG#{signal} to worker #{worker_name}"
Process.kill(signal, pid)
end
end
Expand Down

0 comments on commit 6ab0d17

Please sign in to comment.