Commit 5a892d7e authored by sumpfralle's avatar sumpfralle

fixed re-queueing of previous results

reduced delay after re-queueing


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@760 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 57667344
...@@ -326,9 +326,9 @@ def run_in_parallel_remote(func, args_list, unordered=False, ...@@ -326,9 +326,9 @@ def run_in_parallel_remote(func, args_list, unordered=False,
else: else:
log.debug("Skipping result of non-local task: %s" % result_job_id) log.debug("Skipping result of non-local task: %s" % result_job_id)
# put the result back to the queue for the next manager # put the result back to the queue for the next manager
results_queue.put((result_job_id, result)) results_queue.put((result_job_id, task_id, result))
# wait for 0.5 up to 1.5 seconds before trying again # wait for up to 0.2 seconds before trying again
time.sleep(0.5 + random.random()) time.sleep(random.random() / 5)
except GeneratorExit: except GeneratorExit:
log.debug("Parallel processing canceled: %s" % job_id) log.debug("Parallel processing canceled: %s" % job_id)
# catch this specific (silent) exception and flush the task queue # catch this specific (silent) exception and flush the task queue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment