From 8788388eba72ff14c329504c9ca058b4fb0f8a76 Mon Sep 17 00:00:00 2001 From: SimonKonar Date: Mon, 25 Mar 2024 09:56:17 +0100 Subject: [PATCH] test: Add logger messages for CI debug --- service/blaze_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/blaze_service.py b/service/blaze_service.py index 469c005..5d8aeda 100644 --- a/service/blaze_service.py +++ b/service/blaze_service.py @@ -172,6 +172,8 @@ def sync_samples(self): num_of_samples_before_sync = self.get_number_of_resources("Specimen") logger.debug(f"Current number of Specimens: {num_of_samples_before_sync}.") for sample in self._sample_service.get_all(): + logger.debug(f"Checking if Specimen with ID: {sample.identifier} is present." + f"Checking if Patient with ID: {sample.donor_id} is present") if (not self.is_resource_present_in_blaze(resource_type="Specimen", identifier=sample.identifier) and self.is_resource_present_in_blaze(resource_type="Patient", identifier=sample.donor_id)): logger.debug(f"Specimen with org. ID: {sample.identifier} is not present in Blaze but the Donor is " @@ -251,6 +253,7 @@ def is_resource_present_in_blaze(self, resource_type: str, identifier: str) -> b auth=self._credentials, verify=False) .json() .get("total")) + logger.debug(f"Count of resource : {count} of type: {resource_type} with identifier :{identifier} ") return count > 0 except TypeError: return False