Skip to content

Commit 82e590e

Browse files
committed
Merge branch 'remove-rails-dependency' of https://github.com/veenstra/resque-round-robin
2 parents df2a37a + 647b90e commit 82e590e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/resque/plugins/round_robin/round_robin.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ def queue_depth queuename
2828
def should_work_on_queue? queuename
2929
return true if @queues.include? '*' # workers with QUEUES=* are special and are not subject to queue depth setting
3030
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
3234
return true if max == 0 # 0 means no limiting
3335
cur_depth = queue_depth(queuename)
3436
log! "queue #{queuename} depth = #{cur_depth} max = #{max}"

0 commit comments

Comments
 (0)