From 0ff002c3f04e1feaa2a90894412f17212cdfc580 Mon Sep 17 00:00:00 2001 From: mozzy11 Date: Wed, 20 Nov 2024 20:32:24 +0300 Subject: [PATCH] save succes run only when HLZ is succesfuly parsed --- .../module/xdssender/api/scheduler/PullNotificationsTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/org/openmrs/module/xdssender/api/scheduler/PullNotificationsTask.java b/api/src/main/java/org/openmrs/module/xdssender/api/scheduler/PullNotificationsTask.java index b317135..8fc5313 100644 --- a/api/src/main/java/org/openmrs/module/xdssender/api/scheduler/PullNotificationsTask.java +++ b/api/src/main/java/org/openmrs/module/xdssender/api/scheduler/PullNotificationsTask.java @@ -27,10 +27,11 @@ public class PullNotificationsTask extends AbstractTask { public void execute() { LOGGER.info("Executing " + TASK_NAME); HL7Service hl7Service = Context.getHL7Service(); - boolean success = true; + boolean success = false; for (Message msg : getNotificationsPullPointClient().getNewMessages()) { try { hl7Service.processHL7Message(msg); + success = true; } catch (Exception e) { success = false;