summaryrefslogtreecommitdiffstats
path: root/func/jobthing.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2008-01-23 18:51:33 -0500
committerMichael DeHaan <mdehaan@redhat.com>2008-01-23 18:51:33 -0500
commit33c6e4013874878f05eec593d69e8afdeaae212b (patch)
treee84879dd215ac90d20822ab0574dc1ab99b7ed8a /func/jobthing.py
parent19e4d1ba808cbbe95568271a5b0075b8422e4fb6 (diff)
downloadthird_party-func-33c6e4013874878f05eec593d69e8afdeaae212b.tar.gz
third_party-func-33c6e4013874878f05eec593d69e8afdeaae212b.tar.xz
third_party-func-33c6e4013874878f05eec593d69e8afdeaae212b.zip
Working on async error handling, lots more to do...
(If it hits no exceptions, returns are right, it's the partial error case to deal with next...)
Diffstat (limited to 'func/jobthing.py')
-rw-r--r--func/jobthing.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/func/jobthing.py b/func/jobthing.py
index 486fe6b..5b89599 100644
--- a/func/jobthing.py
+++ b/func/jobthing.py
@@ -23,6 +23,7 @@ import sys
import tempfile
import fcntl
import forkbomb
+import utils
JOB_ID_RUNNING = 0
JOB_ID_FINISHED = 1
@@ -82,6 +83,9 @@ def __access_status(jobid=0, status=0, results=0, clear=False, write=False, purg
__purge_old_jobs(storage)
if write:
+ results = utils.remove_exceptions(results)
+ # print "DEBUG: status=%s" % status
+ # print "DEBUG: results=%s" % results
storage[str(jobid)] = (status, results)
rc = jobid
elif not purge:
@@ -137,7 +141,7 @@ def minion_async_run(function_ref, args):
return job_id
else:
__update_status(job_id, JOB_ID_RUNNING, -1)
- results = function_ref(args)
+ results = function_ref(*args)
__update_status(job_id, JOB_ID_FINISHED, results)
sys.exit(0)