Sha256: 17cbcd128640c68312837f9512684465183783b634487864d7179ffb51d9e40b
Contents?: true
Size: 657 Bytes
Versions: 7
Compression:
Stored size: 657 Bytes
Contents
module Hotseat class << self def queue(db, options={}) Hotseat::Queue.new(db, options) end alias :make_queue :queue def queue?(db, design_doc_name = Hotseat::Queue::DEFAULT_CONFIG[:design_doc_name]) # ignore system dbs like _replicator and _users return false if db.name =~ /^_/ begin db.get "_design/#{design_doc_name}" rescue RestClient::ResourceNotFound # either the database or the design doc does not exist false end end def queues(couch_server) couch_server.databases.select do |db| queue?(couch_server.database(db)) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems