Commit 7647eacb authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch 'hotfix-s/3289-no-process-before-its-preprocess' into 'dev'

No process before its preprocess

Closes #3289

See merge request !209
parents a8b53164 82b18b8a
Pipeline #29083 passed with stages
in 49 seconds
......@@ -441,7 +441,7 @@ def delete():
res = {"redirect": "sample_set/index",
"args" : { "id" : request.vars["redirect_sample_set_id"]},
"message": "sequence file deleted"}
"message": "sequence file ({}) deleted".format(request.vars['id'])}
if associated_id is not None:
log.info(res, extra={'user_id': auth.user.id, 'record_id': associated_id, 'table_name': sample_set.sample_type})
else:
......
......@@ -117,7 +117,7 @@ def schedule_run(id_sequence, id_config, grep_reads=None):
task = scheduler.queue_task(program, args,
repeats = 1, timeout = defs.TASK_TIMEOUT)
if db.sequence_file[id_sequence].pre_process_flag == "WAIT" or db.sequence_file[id_sequence].pre_process_flag == "RUN" :
if db.sequence_file[id_sequence].pre_process_flag != "COMPLETED" and db.sequence_file[id_sequence].pre_process_flag :
db.scheduler_task[task.id] = dict(status ="STOPPED")
db.results_file[data_id] = dict(scheduler_task_id = task.id)
......@@ -152,7 +152,7 @@ def run_vidjil(id_file, id_config, id_data, grep_reads,
from datetime import timedelta as timed
## re schedule if pre_process is still pending
if db.sequence_file[id_file].pre_process_flag == "WAIT" or db.sequence_file[id_file].pre_process_flag == "RUN" :
if db.sequence_file[id_file].pre_process_flag != "COMPLETED" and db.sequence_file[id_file].pre_process_flag:
print("Pre-process is still pending, re-schedule")
......
Supports Markdown
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