Commit 49c47f2e authored by Mathieu Giraud's avatar Mathieu Giraud Committed by Vidjil Team
Browse files

models/task.py, controllers/file.py: pre_process, strealine log messages

parent 708f0d8b
......@@ -363,7 +363,7 @@ def upload():
if db.scheduler_task[db.sequence_file[request.vars["id"]].pre_process_scheduler_task_id] != None:
scheduler.stop_task(db.sequence_file[request.vars["id"]].pre_process_scheduler_task_id)
schedule_pre_process(int(request.vars['id']), int(request.vars['pre_process']))
mes += "files uploaded, start pre-process !! "+ request.vars['id'] + "-" +request.vars['pre_process']
mes += " | p%s start pre_process %s " % (request.vars['pre_process'], request.vars['id'] + "-" +request.vars['pre_process'])
if data_file is not None :
seq_file = defs.DIR_SEQUENCES + data_file
......
......@@ -701,7 +701,7 @@ def run_pre_process(pre_process_id, sequence_file_id, clean_before=True, clean_a
stream = open(filepath, 'rb')
except IOError:
print "!!! Pre-process failed, no result file"
res = {"message": "[%s] c%s: 'pre-process' FAILED - %s" % (sequence_file_id, pre_process_id, output_file)}
res = {"message": "[%s] p%s: 'pre_process' FAILED - %s" % (sequence_file_id, pre_process_id, output_file)}
log.error(res)
db.sequence_file[sequence_file_id] = dict(pre_process_flag = "FAILED")
db.commit()
......@@ -726,7 +726,7 @@ def run_pre_process(pre_process_id, sequence_file_id, clean_before=True, clean_a
p = Popen(clean_cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
p.wait()
res = {"message": "[%s] c%s: 'pre-process' finished - %s" % (sequence_file_id, pre_process_id, output_file)}
res = {"message": "[%s] p%s: 'pre_process' finished - %s" % (sequence_file_id, pre_process_id, output_file)}
log.info(res)
return "SUCCESS"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment