File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ def work(interval = 5.0, &block)
116116 loop do
117117 break if shutdown?
118118
119- if not @ paused and job = reserve
119+ if not paused? and job = reserve
120120 log "got: #{ job . inspect } "
121121 run_hook :before_fork , job
122122 working_on job
@@ -136,7 +136,7 @@ def work(interval = 5.0, &block)
136136 else
137137 break if interval . zero?
138138 log! "Sleeping for #{ interval } seconds"
139- procline @ paused ? "Paused" : "Waiting for #{ @queues . join ( ',' ) } "
139+ procline paused? ? "Paused" : "Waiting for #{ @queues . join ( ',' ) } "
140140 sleep interval
141141 end
142142 end
@@ -298,6 +298,11 @@ def kill_child
298298 end
299299 end
300300
301+ # are we paused?
302+ def paused?
303+ @paused
304+ end
305+
301306 # Stop processing jobs after the current one has completed (if we're
302307 # currently running one).
303308 def pause_processing
You can’t perform that action at this time.
0 commit comments