Skip to content

Commit b3f5acf

Browse files
mxswdsteveklabnik
authored andcommitted
Prepend the redis namespace automatically in multiqueues
1 parent 97d0029 commit b3f5acf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/resque/multi_queue.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def pop(non_block = false)
4949
synchronize do
5050
value = @redis.blpop(*(queue_names + [1])) until value
5151
queue_name, payload = value
52-
queue = @queue_hash[queue_name]
52+
queue = @queue_hash["#{@redis.namespace}:#{queue_name}"]
5353
[queue, queue.decode(payload)]
5454
end
5555
end
@@ -65,7 +65,7 @@ def poll(timeout)
6565
return unless payload
6666

6767
synchronize do
68-
queue = @queue_hash[queue_name]
68+
queue = @queue_hash["#{@redis.namespace}:#{queue_name}"]
6969
[queue, queue.decode(payload)]
7070
end
7171
end

0 commit comments

Comments
 (0)