diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-08-06 19:19:53 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-08-06 19:19:53 -0400 |
commit | d5f6797eadc02012e699d8850d6967d922f92b1f (patch) | |
tree | 2dc32daf36615f5b5e76286cd6f69bf044e2fd2e | |
parent | a24d4c5fb13ff41267ef014c1db089a62ba60ea4 (diff) | |
download | func-d5f6797eadc02012e699d8850d6967d922f92b1f.tar.gz func-d5f6797eadc02012e699d8850d6967d922f92b1f.tar.xz func-d5f6797eadc02012e699d8850d6967d922f92b1f.zip |
Fix async job IDs problem, finally.
-rw-r--r-- | func/jobthing.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/func/jobthing.py b/func/jobthing.py index cc6808b..d5fc2a8 100644 --- a/func/jobthing.py +++ b/func/jobthing.py @@ -170,8 +170,9 @@ def batch_run(pool, callback, nforks,**extra_args): # kick off the job results = forkbomb.batch_run(pool, callback, nforks) - # we now have a list of job id's for each minion, kill the task + # write job IDs to the state file on overlord __update_status(job_id, JOB_ID_PARTIAL, results) + # we now have a list of job id's for each minion, kill the task os._exit(0) def minion_async_run(retriever, method, args): @@ -247,11 +248,11 @@ def job_status(jobid, client_class=None): some_missing = True if some_missing or not interim_results: - if partial_results: - __update_status(jobid, JOB_ID_PARTIAL, partial_results) return (JOB_ID_PARTIAL, partial_results) else: + # Save partial results in state file so next time we don't + # call minions to get status. if partial_results: __update_status(jobid,JOB_ID_FINISHED, partial_results) return (JOB_ID_FINISHED, partial_results) |