Skip to content

Commit

Permalink
Merge pull request #76 from AirHelp/update_launcher_messages
Browse files Browse the repository at this point in the history
Update reporting about shutting down
  • Loading branch information
rapsad authored Dec 11, 2024
2 parents 0346b4f + 3697e16 commit 2300845
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/eventboss/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def start
end

def stop
logger.info('launcher') { 'Gracefully shutdown' }
logger.info('launcher') { 'Starting shutdown' }

@bus.clear
@pollers.each(&:terminate)
Expand All @@ -41,7 +41,10 @@ def stop
end

def hard_shutdown
return if @pollers.empty? && @workers.empty?
if @poolers.empty? && @workers.empty?
logger.info('launcher') { 'Gracefully shutdown' }
return
end

logger.info('launcher') { "Killing remaining #{@pollers.size} pollers, #{@workers.size} workers" }
@pollers.each(&:kill)
Expand Down

0 comments on commit 2300845

Please sign in to comment.