summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof A. Adamski <krzysztofa@gmail.com>2008-06-22 13:24:46 -0400
committerKrzysztof A. Adamski <krzysztofa@gmail.com>2008-06-22 13:24:46 -0400
commit4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd (patch)
tree529e849247c697ebd6404d5b1cc84131d7c73b60
parenta05f793ce3b3fb8f938ea581f51eadf9c4dcdae1 (diff)
downloadthird_party-func-4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd.tar.gz
third_party-func-4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd.tar.xz
third_party-func-4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd.zip
Eliminate concurency between parent and child in batch_run().
-rw-r--r--func/jobthing.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/func/jobthing.py b/func/jobthing.py
index c6c616a..be23cc9 100644
--- a/func/jobthing.py
+++ b/func/jobthing.py
@@ -112,13 +112,12 @@ def batch_run(pool, callback, nforks):
"""
job_id = pprint.pformat(time.time())
+ __update_status(job_id, JOB_ID_RUNNING, -1)
pid = os.fork()
if pid != 0:
- __update_status(job_id, JOB_ID_RUNNING, -1)
return job_id
else:
# kick off the job
- __update_status(job_id, JOB_ID_RUNNING, -1)
results = forkbomb.batch_run(pool, callback, nforks)
# we now have a list of job id's for each minion, kill the task