Commit 8734b3f8 authored by Mikaël Salson's avatar Mikaël Salson

task.py: Failed process must not be relaunched

We were testing if the process failed **after** relaunching the process in
case the process is neither COMPLETED nor DONE. Thus the process was also
relaunched when the pre-process FAILED.

Fix #3606
parent 9402d384
Pipeline #48019 passed with stages
in 7 minutes and 20 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