diff options
| author | makkalot <makkalot@gmail.com> | 2008-08-01 10:07:59 +0300 |
|---|---|---|
| committer | makkalot <makkalot@gmail.com> | 2008-08-01 23:31:22 +0300 |
| commit | dadd9b9253aa377ce393d66101c8ced56ec56fbe (patch) | |
| tree | 7e37a0bb16bd67567526bf67dabb6afa86e89a3c /func | |
| parent | 97f8b2f0111df8df36b7f249c987cc5a9068c5ec (diff) | |
a small fix in the async code that was causing wrong results
(cherry picked from commit d95cb1171598b0450a9a3e32b83ddd057ebf832b)
Diffstat (limited to 'func')
| -rw-r--r-- | func/jobthing.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/func/jobthing.py b/func/jobthing.py index 3b9dc80..d56475a 100644 --- a/func/jobthing.py +++ b/func/jobthing.py @@ -200,7 +200,6 @@ def job_status(jobid, client_class=None): # users should not be calling jobthing.py methods directly. got_status = __get_status(jobid) - # if the status comes back as JOB_ID_PARTIAL what we have is actually a hash # of hostname/minion-jobid pairs. Instantiate a client handle for each and poll them # for their actual status, filling in only the ones that are actually done. @@ -234,11 +233,13 @@ def job_status(jobid, client_class=None): some_missing = True if some_missing: - __update_status(jobid, JOB_ID_PARTIAL, partial_results) + if partial_results: + __update_status(jobid, JOB_ID_PARTIAL, partial_results) return (JOB_ID_PARTIAL, partial_results) - + else: - __update_status(jobid,JOB_ID_FINISHED, partial_results) + if partial_results: + __update_status(jobid,JOB_ID_FINISHED, partial_results) return (JOB_ID_FINISHED, partial_results) else: |
