File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -866,8 +866,8 @@ def processing_job_worflow(self):
866
866
qdb .sql_connection .TRN .add (sql , [self .id ])
867
867
r = qdb .sql_connection .TRN .execute_fetchindex ()
868
868
869
- return (None if not r
870
- else qdb . processing_job . ProcessingWorkflow ( r [ 0 ][ 0 ]) )
869
+ return (qdb . processing_job . ProcessingWorkflow ( r [ 0 ][ 0 ]) if r
870
+ else None )
871
871
872
872
873
873
class ProcessingWorkflow (qdb .base .QiitaObject ):
Original file line number Diff line number Diff line change @@ -35,14 +35,14 @@ def user_jobs_get_req(user):
35
35
cmd = j .command
36
36
if cmd not in cmds :
37
37
cmds [cmd ] = cmd
38
- ccmd = cmds [cmd ]
38
+ name = cmds [cmd ]. name
39
39
hb = j .heartbeat
40
40
hb = "" if hb is None else hb .strftime ("%Y-%m-%d %H:%M:%S" )
41
41
pjw = j .processing_job_worflow
42
42
wid = '' if pjw is None else pjw .id
43
43
response .append ({
44
44
'id' : j .id ,
45
- 'name' : ccmd . name ,
45
+ 'name' : name ,
46
46
'params' : j .parameters .values ,
47
47
'status' : j .status ,
48
48
'heartbeat' : hb ,
Original file line number Diff line number Diff line change 1
1
from tornado .web import authenticated , HTTPError
2
+ from tornado .gen import coroutine
2
3
from future .utils import viewitems
3
4
from wtforms import Form , StringField , validators
4
5
@@ -190,6 +191,7 @@ def post(self):
190
191
191
192
class UserJobs (BaseHandler ):
192
193
@authenticated
194
+ @coroutine
193
195
def get (self ):
194
196
response = user_jobs_get_req (self .current_user )
195
197
self .write (response )
You can’t perform that action at this time.
0 commit comments