Commit 82b18b8a authored by Mikaël Salson's avatar Mikaël Salson
Browse files

models/task.py: Launch process only when pre-process completed

In theory the process could have been launched (and has been, see vdj#684) before the pre-process starts
(when it is QUEUED or ASSIGNED). Now we only allow to start it when the pre-process has been completed
(if it has been defined).

Closes #3289
parent 0b28f9ba
Pipeline #28773 passed with stages
in 28 seconds
......@@ -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")
......
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