Class: CassandraQueue::QueueManager

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra-queue.rb

Overview

Singleton class that manages our cassandra queues

Class Method Summary collapse

Class Method Details

.queue(qid, string_queue, keyspace, servers) ⇒ Object



19
20
21
22
# File 'lib/cassandra-queue.rb', line 19

def self.queue(qid, string_queue, keyspace, servers)
  key = :"#{qid}_#{string_queue}_#{keyspace}_#{servers.flatten.join(',')}"
  queues[key] ||= Queue.send(:new, qid, string_queue, keyspace, servers)
end

.queuesObject



15
16
17
# File 'lib/cassandra-queue.rb', line 15

def self.queues
  @queues ||= {}
end