diff options
author | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-06 18:14:01 -0400 |
---|---|---|
committer | Krzysztof A. Adamski <krzysztofa@gmail.com> | 2008-06-06 18:14:01 -0400 |
commit | 2d23caf2f9e96022dd49781bc00c351dcab7c10c (patch) | |
tree | a1c6623984398506ce593ba6a8267b0be39acf7c /func/jobthing.py | |
parent | 3f62e1d302fb63f1f3c5c72121388c8b0dd6e784 (diff) | |
download | func-2d23caf2f9e96022dd49781bc00c351dcab7c10c.tar.gz func-2d23caf2f9e96022dd49781bc00c351dcab7c10c.tar.xz func-2d23caf2f9e96022dd49781bc00c351dcab7c10c.zip |
Jobthing status codes cleanup.
Diffstat (limited to 'func/jobthing.py')
-rw-r--r-- | func/jobthing.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/func/jobthing.py b/func/jobthing.py index 75a1d1a..bbc4f89 100644 --- a/func/jobthing.py +++ b/func/jobthing.py @@ -27,8 +27,7 @@ import utils JOB_ID_RUNNING = 0 JOB_ID_FINISHED = 1 JOB_ID_LOST_IN_SPACE = 2 -JOB_ID_ASYNC_PARTIAL = 3 -JOB_ID_ASYNC_FINISHED = 4 +JOB_ID_PARTIAL = 3 # how long to retain old job records in the job id database RETAIN_INTERVAL = 60 * 60 @@ -121,7 +120,7 @@ def batch_run(server, process_server, nforks): results = forkbomb.batch_run(server, process_server, nforks) # we now have a list of job id's for each minion, kill the task - __update_status(job_id, JOB_ID_ASYNC_PARTIAL, results) + __update_status(job_id, JOB_ID_PARTIAL, results) sys.exit(0) def minion_async_run(retriever, method, args): @@ -158,13 +157,13 @@ def job_status(jobid, client_class=None): got_status = __get_status(jobid) - # if the status comes back as JOB_ID_ASYNC_PARTIAL what we have is actually a hash + # 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. (interim_rc, interim_results) = got_status - if interim_rc == JOB_ID_ASYNC_PARTIAL: + if interim_rc == JOB_ID_PARTIAL: partial_results = {} @@ -187,9 +186,9 @@ def job_status(jobid, client_class=None): some_missing = True if some_missing: - return (JOB_ID_ASYNC_PARTIAL, partial_results) + return (JOB_ID_PARTIAL, partial_results) else: - return (JOB_ID_ASYNC_FINISHED, partial_results) + return (JOB_ID_FINISHED, partial_results) else: return got_status |