Commit eff82cf2 authored by marc's avatar marc Committed by Vidjil Team
Browse files

file.py: bug-fix edit file don't stop pre-process anymore

parent a9b0fd39
......@@ -373,8 +373,11 @@ def upload():
if data_file is not None and data_file2 is not None and request.vars['pre_process'] != '0':
db.sequence_file[request.vars["id"]] = dict(pre_process_flag = "WAIT")
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)
old_task_id = db.sequence_file[request.vars["id"]].pre_process_scheduler_task_id
if db.scheduler_task[old_task_id] != None:
scheduler.stop_task(old_task_id)
db(db.scheduler_task.id == old_task_id).delete()
db.commit()
schedule_pre_process(int(request.vars['id']), int(request.vars['pre_process']))
mes += " | p%s start pre_process %s " % (request.vars['pre_process'], request.vars['id'] + "-" +request.vars['pre_process'])
......
......@@ -138,7 +138,7 @@ def run_vidjil(id_file, id_config, id_data, grep_reads,
args = [id_file, id_config, id_data, grep_reads]
task = scheduler.queue_task("vidjil", args,
repeats = 1, timeout = defs.TASK_TIMEOUT,
start_time=request.now + timed(seconds=120))
start_time=request.now + timed(seconds=1200))
db.results_file[id_data] = dict(scheduler_task_id = task.id)
db.commit()
print task.id
......
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