Sha256: 24ea1e68b8c6b3a27c1c996f352c34c9d223bfa76e093d2bcbdb0fc656d53509
Contents?: true
Size: 772 Bytes
Versions: 1
Compression:
Stored size: 772 Bytes
Contents
require 'resque' # https://github.com/resque/resque/issues/1559#issuecomment-310908574 Resque::Worker.class_eval do def unregister_signal_handlers trap('TERM') do trap('TERM') do log_with_severity :info, "[resque-heroku] received second term signal, throwing term exception" trap('TERM') do log_with_severity :info, "[resque-heroku] third or more time receiving TERM, ignoring" end raise Resque::TermException.new("SIGTERM") end log_with_severity :info, "[resque-heroku] received first term signal from heroku, ignoring" end trap('INT', 'DEFAULT') begin trap('QUIT', 'DEFAULT') trap('USR1', 'DEFAULT') trap('USR2', 'DEFAULT') rescue ArgumentError end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
resque-heroku-signals-1.27.4.2 | lib/resque-heroku-signals.rb |