mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add TSTP support for 4.x, #3302
This commit is contained in:
parent
671f542eaf
commit
efadb9ac69
3 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,10 @@
|
|||
# Sidekiq Changes
|
||||
|
||||
HEAD
|
||||
-----------
|
||||
|
||||
- Add support for TSTP signal, for Sidekiq 5.0 forward compatibility. [#3302]
|
||||
|
||||
4.2.8
|
||||
-----------
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ module Sidekiq
|
|||
|
||||
self_read, self_write = IO.pipe
|
||||
|
||||
%w(INT TERM USR1 USR2 TTIN).each do |sig|
|
||||
%w(INT TERM USR1 USR2 TTIN TSTP).each do |sig|
|
||||
begin
|
||||
trap sig do
|
||||
self_write.puts(sig)
|
||||
|
@ -135,6 +135,10 @@ module Sidekiq
|
|||
when 'USR1'
|
||||
Sidekiq.logger.info "Received USR1, no longer accepting new work"
|
||||
launcher.quiet
|
||||
when 'TSTP'
|
||||
# USR1 is not available on JVM, allow TSTP as an alternate signal
|
||||
Sidekiq.logger.info "Received TSTP, no longer accepting new work"
|
||||
launcher.quiet
|
||||
when 'USR2'
|
||||
if Sidekiq.options[:logfile]
|
||||
Sidekiq.logger.info "Received USR2, reopening log file"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Sidekiq
|
||||
VERSION = "4.2.8"
|
||||
VERSION = "4.2.9"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue