#task_histories

This commit is contained in:
xieshen 2020-11-05 18:12:08 +08:00
parent 36f0c44572
commit 01f06c4226
1 changed files with 10 additions and 1 deletions

View File

@ -118,7 +118,16 @@ def task_histories(request):
o = dict()
o['status'] = r[2]
o['run_time'] = r[3]
o['output'] = r[4][1:-1]
output = str(r[4])[1:-1].split(',')[3][2:-2]
print(output)
output_list = str(output).split('\\n')
print(output_list)
o['output'] = str(r[4])[1:-1]
o['success'] = output_list[0]
o['data'] = output_list[1]
o['msg'] = output_list[2]
task.append(o)
with connection.cursor() as cursor1:
cursor1.execute("select * from tasks where id = '%s'" % (id))