1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Only trap USR2 on sidekiq pro (#4653)

This commit is contained in:
Igor 2020-07-27 20:51:10 +02:00 committed by GitHub
parent e7acb124fb
commit 494192f656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@ module Sidekiq
self_read, self_write = IO.pipe
sigs = %w[INT TERM TTIN TSTP]
# USR1 and USR2 don't work on the JVM
sigs << "USR2" unless jruby?
sigs << "USR2" if Sidekiq.pro? && !jruby?
sigs.each do |sig|
trap sig do
self_write.puts(sig)