lib/resque/scheduler.rb in resque-scheduler-1.9.4 vs lib/resque/scheduler.rb in resque-scheduler-1.9.5
- old
+ new
@@ -37,10 +37,16 @@
# poll/enqueing to finish (should be almost istant). In the
# case of sleeping, exit immediately.
def register_signal_handlers
trap("TERM") { shutdown }
trap("INT") { shutdown }
- trap('QUIT') { shutdown } unless defined? JRUBY_VERSION
+
+ begin
+ trap('QUIT') { shutdown }
+ trap('USR1') { kill_child }
+ rescue ArgumentError
+ warn "Signals QUIT and USR1 not supported."
+ end
end
# Pulls the schedule from Resque.schedule and loads it into the
# rufus scheduler instance
def load_schedule!