Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reporting about shutting down #76

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading