summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-17 23:07:40 +0300
committermakkalot <makkalot@gmail.com>2008-08-17 23:07:40 +0300
commit016673a62ddbd58694b0c60cc510da4ac7b4ba13 (patch)
tree5505f09e0c34270c19f5f4a5c456ea7f6f8d186a /funcweb
parent2805cfeb0359daf64e97c02a04c13603955e265d (diff)
downloadfunc-016673a62ddbd58694b0c60cc510da4ac7b4ba13.tar.gz
func-016673a62ddbd58694b0c60cc510da4ac7b4ba13.tar.xz
func-016673a62ddbd58694b0c60cc510da4ac7b4ba13.zip
add the smart parser for comming minion results
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/controllers.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/funcweb/funcweb/controllers.py b/funcweb/funcweb/controllers.py
index 9cf7fc3..4434db2 100644
--- a/funcweb/funcweb/controllers.py
+++ b/funcweb/funcweb/controllers.py
@@ -458,7 +458,7 @@ class Funcweb(object):
return dict(changed = changed,changes = changes)
- @expose(template="funcweb.templates.result")
+ @expose(format = "json")
@identity.require(identity.not_anonymous())
def check_job_status(self,job_id):
"""
@@ -483,12 +483,19 @@ class Funcweb(object):
try:
id_result = fc_async.job_status(job_id)
+ #parse the comming data in a better looking way :)
+ from funcweb.result_handler import produce_res_rec
+ minion_result = produce_res_rec(id_result[1])
+ #print "The current minion_result is : ",minion_result
+ global_result = {'id':0,'item':[]}
+ global_result['item'].extend(minion_result)
+
except Exception,e:
flash("We encountered some error while getting the status for %s job id"%(job_id))
return dict()
#the final id_result
- return dict(result=id_result)
+ return dict(minion_result = global_result)
@expose(template="funcweb.templates.async_table")
@identity.require(identity.not_anonymous())