summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--func/jobthing.py13
-rw-r--r--func/overlord/cmd_modules/call.py4
-rw-r--r--test/async_test.py4
3 files changed, 10 insertions, 11 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
diff --git a/func/overlord/cmd_modules/call.py b/func/overlord/cmd_modules/call.py
index edf9f38..bb9a61e 100644
--- a/func/overlord/cmd_modules/call.py
+++ b/func/overlord/cmd_modules/call.py
@@ -146,11 +146,11 @@ class Call(base_command.BaseCommand):
(return_code, async_results) = self.overlord_obj.job_status(results)
if return_code == jobthing.JOB_ID_RUNNING:
time.sleep(0.1)
- elif return_code == jobthing.JOB_ID_ASYNC_FINISHED:
+ elif return_code == jobthing.JOB_ID_FINISHED:
async_done = True
partial = self.print_partial_results(partial, async_results, self.options.sort)
return partial
- elif return_code == jobthing.JOB_ID_ASYNC_PARTIAL:
+ elif return_code == jobthing.JOB_ID_PARTIAL:
if not self.options.sort:
partial = self.print_partial_results(partial, async_results)
else:
diff --git a/test/async_test.py b/test/async_test.py
index 8e6961d..8e0495f 100644
--- a/test/async_test.py
+++ b/test/async_test.py
@@ -44,12 +44,12 @@ def __tester(async,test):
return
if code == jobthing.JOB_ID_RUNNING:
print "task is still running, %s elapsed ..." % delta
- elif code == jobthing.JOB_ID_ASYNC_PARTIAL:
+ elif code == jobthing.JOB_ID_PARTIAL:
print "task reports partial status, %s elapsed, results = %s" % (delta, results)
elif code == jobthing.JOB_ID_FINISHED:
print "(non-async) task complete, %s elapsed, results = %s" % (delta, results)
return
- elif code == jobthing.JOB_ID_ASYNC_FINISHED:
+ elif code == jobthing.JOB_ID_FINISHED:
print "(async) task complete, %s elapsed, results = %s" % (delta, results)
return
else: