Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added method for listing all queues on the redis instance

  • Loading branch information...
commit 3079b1cb84fedcd567973ea93fdd129f275d6f8a 1 parent a3b8e1e
@tobi authored
View
2  client.rb → queue/client.rb
@@ -5,6 +5,8 @@
start_time = Time.now.to_i
msg = 0
+puts Queue.all
+
queue = Queue.new("testing")
queue.subscribe do |obj|
msg += 1
View
5 queue.rb → queue/queue.rb
@@ -10,6 +10,11 @@ class Queue
def initialize(name)
@queue_name = "queue:#{name}"
+ $redis.sadd("queues", @queue_name)
+ end
+
+ def self.all
+ $redis.smembers("queues")
end
def clear
View
0  server.rb → queue/server.rb
File renamed without changes

0 comments on commit 3079b1c

Please sign in to comment.
Something went wrong with that request. Please try again.