smbinterp/interp/cluster/__init__.py
Stephen Mardson McQuay 88520ffe33 renamed slave to minion
--HG--
rename : bin/slave.py => bin/minion.py
2011-05-08 13:36:06 -06:00

22 lines
621 B
Python

from multiprocessing.managers import BaseManager
import Queue
tasks_q = Queue.Queue()
results_q = Queue.Queue()
minions_q = Queue.Queue()
master_q = Queue.Queue()
class QueueManager(BaseManager):
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 )
def get_qs(m):
"""
returns all relevant queues
"""
return (m.get_tasks_q(), m.get_results_q(), m.get_master_q(), m.get_minions_q())