mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Attempting to debug why background jobs aren't always waited for
This commit is contained in:
parent
df3f34e81c
commit
af3d62c46a
2 changed files with 4 additions and 2 deletions
|
@ -195,7 +195,9 @@ module Puma
|
|||
server = start_server
|
||||
|
||||
Signal.trap "SIGTERM" do
|
||||
STDERR.puts "Got SIGTERM in worker"
|
||||
server.stop
|
||||
STDERR.puts "Finished processing SIGTERM in worker"
|
||||
end
|
||||
|
||||
begin
|
||||
|
|
|
@ -756,7 +756,7 @@ module Puma
|
|||
# The server, in another thread, is shutting down
|
||||
end
|
||||
|
||||
@thread.join if @thread && sync
|
||||
(@thread.join and @thread = nil) if @thread && sync
|
||||
end
|
||||
|
||||
def halt(sync=false)
|
||||
|
@ -766,7 +766,7 @@ module Puma
|
|||
# The server, in another thread, is shutting down
|
||||
end
|
||||
|
||||
@thread.join if @thread && sync
|
||||
(@thread.join and @thread = nil) if @thread && sync
|
||||
end
|
||||
|
||||
def begin_restart
|
||||
|
|
Loading…
Add table
Reference in a new issue