Permalink
Browse files

Prepend the redis namespace automatically in multiqueues

  • Loading branch information...
1 parent 2370574 commit 9e01c2f884590c7eff73b4abbf0efa70193cf8fc @mxswd mxswd committed with steveklabnik Sep 23, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/resque/multi_queue.rb
@@ -49,7 +49,7 @@ def pop(non_block = false)
synchronize do
value = @redis.blpop(*(queue_names + [1])) until value
queue_name, payload = value
- queue = @queue_hash[queue_name]
+ queue = @queue_hash["#{@redis.namespace}:#{queue_name}"]
[queue, queue.decode(payload)]
end
end
@@ -65,7 +65,7 @@ def poll(timeout)
return unless payload
synchronize do
- queue = @queue_hash[queue_name]
+ queue = @queue_hash["#{@redis.namespace}:#{queue_name}"]
[queue, queue.decode(payload)]
end
end

0 comments on commit 9e01c2f

Please sign in to comment.