master.lib package¶
Subpackages¶
Submodules¶
master.lib.amqp_man module¶
-
class
master.lib.amqp_man.AmqpManager(host=None)[source]¶ Bases:
threading.ThreadA class to manage jobs (starting/stopping/cancelling/etc)
-
AMQP_JOB_QUEUE= 'jobs'¶
-
AMQP_JOB_RESULT_QUEUE= 'job_results'¶
-
consume_queue(queue_name, callback, no_ack=False)[source]¶ Consume from the queue
queue_namewith callbackcallback
-
declare_queue(queue_name, **props)[source]¶ Declare the queue
queue_namewith properties defined in**propskwargs. Popular properties to set:- durable
- exclusive
- auto_delete
-
get_message_count(queue_name, **props)[source]¶ Get the size of the amqp queue
queue_name. Note that thepropskwargs must match the declaration properties of the queue. Getting the queue size is done by redeclaring the queue with the same properties, with the additionalpassive=Trueproperty set.Queue_name: The name of the queue
-
queue_msg(msg, queue_name, **props)[source]¶ Queue the message
msgin the queuequeue_nameParameters: - msg (str) – The message to send (str or unicode)
- queue_name (str) – The queue to put the message in
- **props (dict) –
Any additional props (exchange, etc)
-
master.lib.mongo_oplog_watcher module¶
-
class
master.lib.mongo_oplog_watcher.OplogPrinter(db=None, collection=None, poll_time=1.0, connection=None)[source]¶