diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-07 15:04:52 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-07 15:04:52 -0400 |
commit | 721fa16f64627fcd5b0d0b5c4f9d9e382729bfa0 (patch) | |
tree | f54a1bfd58df41492a788fefa839ec6e13fa3206 /func | |
parent | dee316020aaf6e70c909ea177adf2742a33e2b7b (diff) | |
download | third_party-func-721fa16f64627fcd5b0d0b5c4f9d9e382729bfa0.tar.gz third_party-func-721fa16f64627fcd5b0d0b5c4f9d9e382729bfa0.tar.xz third_party-func-721fa16f64627fcd5b0d0b5c4f9d9e382729bfa0.zip |
Eliminate concurency between parent and child which could override job status.
Diffstat (limited to 'func')
-rw-r--r-- | func/jobthing.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/func/jobthing.py b/func/jobthing.py index 033368c..0e613f8 100644 --- a/func/jobthing.py +++ b/func/jobthing.py @@ -132,14 +132,12 @@ def minion_async_run(retriever, method, args): job_id = "%s-minion" % time.time() + __update_status(job_id, JOB_ID_RUNNING, -1) pid = os.fork() if pid != 0: - __update_status(job_id, JOB_ID_RUNNING, -1) os.waitpid(pid, 0) return job_id else: - __update_status(job_id, JOB_ID_RUNNING, -1) - # daemonize! os.umask(077) os.chdir('/') |