renamed slave to minion
--HG-- rename : bin/slave.py => bin/minion.py
This commit is contained in:
parent
a84c7fda4e
commit
88520ffe33
@ -18,7 +18,7 @@ if sys.argv[1].startswith("st"):
|
||||
print " tasksq : %d" % tq.qsize()
|
||||
print " resultsq : %d" % rq.qsize()
|
||||
print " masterq : %d" % mq.qsize()
|
||||
print " slavesq : %d" % sq.qsize()
|
||||
print " minionsq : %d" % sq.qsize()
|
||||
|
||||
if sys.argv[1] == 'add':
|
||||
for i in xrange(int(sys.argv[2])):
|
||||
|
@ -57,7 +57,7 @@ if __name__ == '__main__':
|
||||
m = QueueManager(address=(server, options.port), authkey='asdf')
|
||||
m.connect()
|
||||
|
||||
tasksq, resultsq, masterq, slavesq = get_qs(m)
|
||||
tasksq, resultsq, masterq, minionsq = get_qs(m)
|
||||
|
||||
if not options.participants:
|
||||
print "wait on all announced participants"
|
||||
@ -91,7 +91,7 @@ if __name__ == '__main__':
|
||||
|
||||
for i in xrange(participants):
|
||||
print "sending worker %d start message" % (i+1,)
|
||||
slavesq.put("start")
|
||||
minionsq.put("start")
|
||||
|
||||
receive_start = time.time()
|
||||
widgets = ['interpolate: ', Percentage(), ' ', Bar(), ' ', ETA()]
|
||||
@ -109,7 +109,7 @@ if __name__ == '__main__':
|
||||
# shut down all participants
|
||||
for i in xrange(participants):
|
||||
if options.last:
|
||||
slavesq.put("teardown")
|
||||
minionsq.put("teardown")
|
||||
|
||||
# post processing
|
||||
stats = {}
|
||||
|
@ -46,7 +46,7 @@ if __name__ == '__main__':
|
||||
m = QueueManager(address=(server, options.port), authkey='asdf')
|
||||
m.connect()
|
||||
|
||||
tasksq, resultsq, masterq, slavesq = get_qs(m)
|
||||
tasksq, resultsq, masterq, minionsq = get_qs(m)
|
||||
|
||||
g = ggrid(input_file)
|
||||
g.q = np.array([exact(x) for x in g.verts])
|
||||
@ -60,7 +60,7 @@ if __name__ == '__main__':
|
||||
# indicate that I am loaded up, and ready for workload
|
||||
masterq.put(myname)
|
||||
# wait for master's start signal
|
||||
action = slavesq.get()
|
||||
action = minionsq.get()
|
||||
if action == "teardown":
|
||||
# I take it back; I'm not ready!
|
||||
masterq.get()
|
@ -3,7 +3,7 @@ import Queue
|
||||
|
||||
tasks_q = Queue.Queue()
|
||||
results_q = Queue.Queue()
|
||||
slaves_q = Queue.Queue()
|
||||
minions_q = Queue.Queue()
|
||||
master_q = Queue.Queue()
|
||||
|
||||
class QueueManager(BaseManager):
|
||||
@ -11,11 +11,11 @@ class QueueManager(BaseManager):
|
||||
|
||||
QueueManager.register('get_tasks_q', callable=lambda:tasks_q )
|
||||
QueueManager.register('get_results_q', callable=lambda:results_q)
|
||||
QueueManager.register('get_slaves_q', callable=lambda:slaves_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_slaves_q())
|
||||
return (m.get_tasks_q(), m.get_results_q(), m.get_master_q(), m.get_minions_q())
|
||||
|
Loading…
Reference in New Issue
Block a user