diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-22 13:24:46 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-22 13:24:46 -0400 |
commit | 4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd (patch) | |
tree | 529e849247c697ebd6404d5b1cc84131d7c73b60 | |
parent | a05f793ce3b3fb8f938ea581f51eadf9c4dcdae1 (diff) | |
download | func-4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd.tar.gz func-4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd.tar.xz func-4c8980b5d750f3ea2f71170bc7e1f072dd01d5cd.zip |
Eliminate concurency between parent and child in batch_run().
-rw-r--r-- | func/jobthing.py | 3 |
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 |