Skip to content

Commit 2763666

Browse files
committed
Queue depth is unlimited by default.
1 parent 2bdd94d commit 2763666

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/resque/plugins/round_robin/round_robin.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ def queue_depth queuename
2424
busy_queues.select {|q| q == queuename }.size
2525
end
2626

27+
DEFAULT_QUEUE_DEPTH = 0
2728
def should_work_on_queue? queuename
2829
return true if @queues.include? '*' # workers with QUEUES=* are special and are not subject to queue depth setting
29-
max = 1 # by default, workers are limited to 1 per queue
30+
max = DEFAULT_QUEUE_DEPTH
3031
max = ENV["RESQUE_QUEUE_DEPTH"].to_i if ENV["RESQUE_QUEUE_DEPTH"].present?
3132
return true if max == 0 # 0 means no limiting
3233
return true if queue_depth(queuename) < max
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Resque
22
module Plugins
33
module RoundRobin
4-
VERSION = "0.1.0"
4+
VERSION = "0.1.1"
55
end
66
end
77
end

0 commit comments

Comments
 (0)