File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
lib/resque/plugins/round_robin Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ def queue_depth queuename
28
28
def should_work_on_queue? queuename
29
29
return true if @queues . include? '*' # workers with QUEUES=* are special and are not subject to queue depth setting
30
30
max = DEFAULT_QUEUE_DEPTH
31
- max = ENV [ "RESQUE_QUEUE_DEPTH" ] . to_i if ENV [ "RESQUE_QUEUE_DEPTH" ] . present?
31
+ unless ENV [ "RESQUE_QUEUE_DEPTH" ] . nil? || ENV [ "RESQUE_QUEUE_DEPTH" ] == ""
32
+ max = ENV [ "RESQUE_QUEUE_DEPTH" ] . to_i
33
+ end
32
34
return true if max == 0 # 0 means no limiting
33
35
cur_depth = queue_depth ( queuename )
34
36
log! "queue #{ queuename } depth = #{ cur_depth } max = #{ max } "
Original file line number Diff line number Diff line change 1
1
module Resque
2
2
module Plugins
3
3
module RoundRobin
4
- VERSION = "0.1.2 "
4
+ VERSION = "0.1.3 "
5
5
end
6
6
end
7
7
end
You can’t perform that action at this time.
0 commit comments