summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorKrzysztof A. Adamski <krzysztofa@gmail.com>2008-06-04 17:35:16 -0400
committerKrzysztof A. Adamski <krzysztofa@gmail.com>2008-06-04 17:35:16 -0400
commitaa5b6241c97ebe1154eca2081b88dbe017cbac80 (patch)
treea05069ef5cd10ec7549fe70ed44d65c41ee35bf4 /func
parentcb63b958f46f21624f3b9bb00f1cc92aaf61da70 (diff)
downloadthird_party-func-aa5b6241c97ebe1154eca2081b88dbe017cbac80.tar.gz
third_party-func-aa5b6241c97ebe1154eca2081b88dbe017cbac80.tar.xz
third_party-func-aa5b6241c97ebe1154eca2081b88dbe017cbac80.zip
Jobthing status codes cleanup.
Diffstat (limited to 'func')
-rw-r--r--func/jobthing.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/func/jobthing.py b/func/jobthing.py
index ea8d92c..77a73fb 100644
--- a/func/jobthing.py
+++ b/func/jobthing.py
@@ -27,9 +27,8 @@ 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_REMOTE_ERROR = 5
+JOB_ID_PARTIAL = 3
+JOB_ID_REMOTE_ERROR = 4
# how long to retain old job records in the job id database
RETAIN_INTERVAL = 60 * 60
@@ -123,7 +122,7 @@ def batch_run(pool, callback, nforks):
results = forkbomb.batch_run(pool, callback, 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):
@@ -161,13 +160,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 = {}
@@ -194,9 +193,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