Commit 492c8a07 authored by Ryan Herbert's avatar Ryan Herbert

task.py run_vidjil check for failure before reschedule

The if statements that checks whether the pre_process is not COMPLETED
of DONE doesn't account for when the pre_process has FAILED, so checking
whether the pre_process has failed before rescheduling a new process,
prevents an infinite loop of queued processes.

See #3606
parent 9402d384
Pipeline #47666 failed with stages
in 1 minute and 7 seconds
......@@ -184,6 +184,11 @@ def run_vidjil(id_file, id_config, id_data, grep_reads,
from subprocess import Popen, PIPE, STDOUT, os
from datetime import timedelta as timed
if db.sequence_file[id_file].pre_process_flag == "FAILED" :
print("Pre-process has failed")
raise ValueError('pre-process has failed')
return "FAIL"
## re schedule if pre_process is still pending
if db.sequence_file[id_file].pre_process_flag not in ["COMPLETED", "DONE"] and db.sequence_file[id_file].pre_process_flag:
......@@ -200,11 +205,6 @@ def run_vidjil(id_file, id_config, id_data, grep_reads,
return "SUCCESS"
if db.sequence_file[id_file].pre_process_flag == "FAILED" :
print("Pre-process has failed")
raise ValueError('pre-process has failed')
return "FAIL"
## les chemins d'acces a vidjil / aux fichiers de sequences
upload_folder = defs.DIR_SEQUENCES
out_folder = defs.DIR_OUT_VIDJIL_ID % id_data
......
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