added sleep to try to fix bug

This commit is contained in:
Stephen McQuay 2011-03-30 23:09:10 -06:00
parent 1401f5b2ec
commit 16bfca3bd5
1 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys
import time
from multiprocessing.managers import BaseManager
@ -18,13 +19,14 @@ QueueManager.register('get_inqueue' )
QueueManager.register('get_outqueue')
def work(inq, outq, g, myname):
print "%s about to send my name: %s" % (datetime.datetime.now(), myname)
# print "%s about to send my name: %s" % (datetime.datetime.now(), myname)
outq.put((myname, "ready"))
while True:
i, o, e, X = inq.get()
if i == None:
return o
shutdown = o
return shutdown
a = g.run_baker(X, order = o, extra_points = e)
outq.put((i, myname, a['qlin'], a['error'], a['final'], exact(X)))
@ -58,6 +60,8 @@ if __name__ == '__main__':
g.q = np.array([exact(x) for x in g.verts])
myname = options.label
shutdown = False
while not shutdown:
time.sleep(5)
shutdown = work(inq, outq, g, myname)