Module: Hotseat
- Defined in:
- lib/hotseat/queue.rb,
lib/hotseat/hotseat.rb
Defined Under Namespace
Classes: Queue, QueueError
Class Method Summary
collapse
Class Method Details
.queue(db, options = {}) ⇒ Object
Also known as:
make_queue
5
6
7
|
# File 'lib/hotseat/hotseat.rb', line 5
def queue(db, options={})
Hotseat::Queue.new(db, options)
end
|
.queue?(db, design_doc_name = Hotseat::Queue::DEFAULT_CONFIG[:design_doc_name]) ⇒ Boolean
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/hotseat/hotseat.rb', line 10
def queue?(db, design_doc_name = Hotseat::Queue::DEFAULT_CONFIG[:design_doc_name])
return false if db.name =~ /^_/
begin
db.get "_design/#{design_doc_name}"
rescue RestClient::ResourceNotFound
false
end
end
|
.queues(couch_server) ⇒ Object
21
22
23
24
25
|
# File 'lib/hotseat/hotseat.rb', line 21
def queues(couch_server)
couch_server.databases.select do |db|
queue?(couch_server.database(db))
end
end
|