From 7e23694465bdcbf37ef311aa687426d00a9837af Mon Sep 17 00:00:00 2001 From: MarvinDo Date: Mon, 19 Aug 2024 10:36:42 +0200 Subject: [PATCH] improved heredicare upload and update gitignore --- .gitignore | 1 + .../webapp/utils/upload_status_checker.py | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 050e6de3..1328eea2 100644 --- a/.gitignore +++ b/.gitignore @@ -171,6 +171,7 @@ fabric.properties .env .env_localtest .env_dev +.env_prod src/frontend_celery/logs /src/frontend_celery/webapp/static/files/ classified_structural_variants diff --git a/src/frontend_celery/webapp/utils/upload_status_checker.py b/src/frontend_celery/webapp/utils/upload_status_checker.py index 6a07d5b3..d6b5f513 100644 --- a/src/frontend_celery/webapp/utils/upload_status_checker.py +++ b/src/frontend_celery/webapp/utils/upload_status_checker.py @@ -78,10 +78,14 @@ def check_update_heredicare_status(variant_id, publish_queue_ids_oi: list, conn: heredicare_queue_entries = conn.get_heredicare_queue_entries(publish_queue_ids_oi, variant_id) # if an upload was successful update the respective needs_upload field + needs_heredicare_upload = False for heredicare_queue_entry in heredicare_queue_entries: - if heredicare_queue_entry[1] in ["success"]: - consensus_classification_id = heredicare_queue_entry[8] - conn.update_consensus_classification_needs_heredicare_upload(consensus_classification_id) + if heredicare_queue_entry[1] in ["error"]: + needs_heredicare_upload = True + + if not needs_heredicare_upload: + consensus_classification_id = heredicare_queue_entry[8] + conn.update_consensus_classification_needs_heredicare_upload(consensus_classification_id) return heredicare_queue_entries