From 89a141c4b1f1af4f06bdea961a76716ff46f3981 Mon Sep 17 00:00:00 2001 From: April Shen Date: Thu, 17 Oct 2024 11:43:06 +0100 Subject: [PATCH] update exit code for duplicate accession monitoring --- accession-monitoring/monitor_duplicate_accessions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accession-monitoring/monitor_duplicate_accessions.py b/accession-monitoring/monitor_duplicate_accessions.py index 0008b968..a48febfa 100644 --- a/accession-monitoring/monitor_duplicate_accessions.py +++ b/accession-monitoring/monitor_duplicate_accessions.py @@ -67,7 +67,8 @@ def report_duplicates_in_exported_accessions_file(mongo_connection_properties, c if int(number_of_duplicate_accessions) > 0: notify_by_email(mongo_connection_properties, collection_name, duplicates_output_filename, number_of_duplicate_accessions, email_recipients) - return 1 + # Use exit code 0 as scheduler will also send email on crash + return 0 else: logger.info("NO duplicate accessions were found in the {0} collection in the {1} database at {2}..." .format(collection_name, mongo_connection_properties["mongo_db"],