whitespace and docstrings

This commit is contained in:
Stephen McQuay 2011-05-15 18:01:45 -06:00
parent 2a292a5ef1
commit 36ae72387a
2 changed files with 17 additions and 12 deletions

View File

@ -66,8 +66,6 @@ if __name__ == '__main__':
print "%s: master said go!!" % myname
if action in ('teardown', 'slay'):
# take back one name ?
# masterq.get()
break
while not tasksq.empty():

View File

@ -7,6 +7,9 @@ minions_q = Queue.Queue()
master_q = Queue.Queue()
class QueueManager(BaseManager):
"""
One QueueManager to rule all network Queues
"""
pass
QueueManager.register('get_tasks_q' , callable=lambda:tasks_q )
@ -14,8 +17,12 @@ QueueManager.register('get_results_q', callable=lambda:results_q)
QueueManager.register('get_minions_q', callable=lambda:minions_q )
QueueManager.register('get_master_q' , callable=lambda:master_q )
def get_qs(m):
def get_qs(qm):
"""
returns all relevant queues
pass in a QueueManager, and this function returns all relevant
queues attached to that QueueManager.
"""
return (m.get_tasks_q(), m.get_results_q(), m.get_master_q(), m.get_minions_q())
return (qm.get_tasks_q(),
qm.get_results_q(),
qm.get_master_q(),
qm.get_minions_q())