diff options
| author | makkalot <makkalot@gmail.com> | 2008-07-17 12:23:56 +0300 |
|---|---|---|
| committer | makkalot <makkalot@gmail.com> | 2008-07-17 12:23:56 +0300 |
| commit | b53416b16bd54bf7a0ffbc0029d71b2a71e84a87 (patch) | |
| tree | 6ea7ecf446f4e9a7022e13577272a474b01167c9 /func | |
| parent | 010cb16064a473758a5bc01e6c5080a031bf26c9 (diff) | |
should update also the database if have some partial result or finished the job, because everytime we do fc.job_status we will call the minion instead of looking at local db
Diffstat (limited to 'func')
| -rw-r--r-- | func/jobthing.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/func/jobthing.py b/func/jobthing.py index df5f195..b8fd1d7 100644 --- a/func/jobthing.py +++ b/func/jobthing.py @@ -216,8 +216,8 @@ def job_status(jobid, client_class=None): else: (minion_interim_rc, minion_interim_result) = minion_result - if minion_interim_rc not in [ JOB_ID_RUNNING ]: - if minion_interim_rc in [ JOB_ID_LOST_IN_SPACE ]: + if minion_interim_rc != JOB_ID_RUNNING : + if minion_interim_rc == JOB_ID_LOST_IN_SPACE: partial_results[host] = [ utils.REMOTE_ERROR, "lost job" ] else: partial_results[host] = minion_interim_result @@ -225,8 +225,11 @@ def job_status(jobid, client_class=None): some_missing = True if some_missing: + __update_status(jobid, JOB_ID_PARTIAL, partial_results) return (JOB_ID_PARTIAL, partial_results) + else: + __update_status(jobid,JOB_ID_FINISHED, partial_results) return (JOB_ID_FINISHED, partial_results) else: |
