Skip to content

Commit

Permalink
Merge ef9e540 into 9f93ea3
Browse files Browse the repository at this point in the history
  • Loading branch information
ktheory committed May 7, 2013
2 parents 9f93ea3 + ef9e540 commit c585988
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/resque/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Worker

attr_reader :worker_queues

attr_accessor :graceful_term

# Workers should be initialized with an array of string queue
# names. The order is important: a Worker will check the first
# queue given for a job. If none is found, it will check the
Expand Down Expand Up @@ -360,7 +362,7 @@ def enable_gc_optimizations
# USR2: Don't process any new jobs
# CONT: Start processing jobs again after a USR2
def register_signal_handlers
trap('TERM') { shutdown! }
trap('TERM') { graceful_term ? shutdown : shutdown! }
trap('INT') { shutdown! }

begin
Expand Down

0 comments on commit c585988

Please sign in to comment.