From 69e58025dec23d80fb3468243c2b493387497dfa Mon Sep 17 00:00:00 2001 From: Raymond Lim Date: Fri, 3 Nov 2023 17:28:12 -0400 Subject: [PATCH] fix: dsa upload log message --- src/luna/pathology/dsa/dsa_api_handler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/luna/pathology/dsa/dsa_api_handler.py b/src/luna/pathology/dsa/dsa_api_handler.py index eda1b2b7..4467ac5d 100644 --- a/src/luna/pathology/dsa/dsa_api_handler.py +++ b/src/luna/pathology/dsa/dsa_api_handler.py @@ -359,7 +359,7 @@ def copy_item(gc, item_id: str, destination_id: str): raise RuntimeError("Can not copy item") -def check_annotation_exists( +def check_annotation_exists_with_retry( gc: girder_client.GirderClient, item_uuid: str, annotation_name: str, @@ -427,13 +427,13 @@ def push_annotation_to_dsa_image( ) # Wait for annotation to be processed - annotation_id = check_annotation_exists( + annotation_id = check_annotation_exists_with_retry( gc, item_uuid, annotation_name, retry_count=100, delay=20 ) if annotation_id: logger.info(f"Annotation successfully pushed to DSA as {annotation_id}.") - - logger.info("Annotation pushed to DSA but still processing.") + else: + logger.info("Annotation pushed to DSA but still processing.") logger.info(f"Time to push annotation {time.time() - start}") logger.info(f"{uri}/histomics#?image={item_uuid}") return annotation_id