Skip to content

Commit 647b90e

Browse files
author
Jack Veenstra
committed
Replace call to present? with non-rails equivalent.
Also bump the version to 0.1.3.
1 parent 7658284 commit 647b90e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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}"
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.2"
4+
VERSION = "0.1.3"
55
end
66
end
77
end

0 commit comments

Comments
 (0)