added sleep to try to fix bug
This commit is contained in:
parent
1401f5b2ec
commit
16bfca3bd5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user