whitespace and docstrings
This commit is contained in:
parent
2a292a5ef1
commit
36ae72387a
@ -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():
|
||||
|
@ -1,21 +1,28 @@
|
||||
from multiprocessing.managers import BaseManager
|
||||
import Queue
|
||||
|
||||
tasks_q = Queue.Queue()
|
||||
results_q = Queue.Queue()
|
||||
tasks_q = Queue.Queue()
|
||||
results_q = Queue.Queue()
|
||||
minions_q = Queue.Queue()
|
||||
master_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 )
|
||||
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 )
|
||||
QueueManager.register('get_tasks_q' , callable=lambda:tasks_q )
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user