From e66982e7bab1b4cf1cab6c9569ad22f0333d4015 Mon Sep 17 00:00:00 2001 From: Hamza Jugon Date: Wed, 27 Nov 2024 16:33:48 +0000 Subject: [PATCH] revert changes to schedulerApiary --- .../scheduler/apiary/service/SchedulerApiary.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/beekeeper-scheduler-apiary/src/main/java/com/expediagroup/beekeeper/scheduler/apiary/service/SchedulerApiary.java b/beekeeper-scheduler-apiary/src/main/java/com/expediagroup/beekeeper/scheduler/apiary/service/SchedulerApiary.java index 3ad876a1..ed9a1825 100644 --- a/beekeeper-scheduler-apiary/src/main/java/com/expediagroup/beekeeper/scheduler/apiary/service/SchedulerApiary.java +++ b/beekeeper-scheduler-apiary/src/main/java/com/expediagroup/beekeeper/scheduler/apiary/service/SchedulerApiary.java @@ -22,8 +22,6 @@ import java.util.List; import java.util.Optional; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -53,7 +51,7 @@ public SchedulerApiary( @Transactional public void scheduleBeekeeperEvent() { Optional housekeepingEntitiesToBeScheduled = beekeeperEventReader.read(); - if (housekeepingEntitiesToBeScheduled.isEmpty()) {return;} + if (housekeepingEntitiesToBeScheduled.isEmpty()) { return; } BeekeeperEvent beekeeperEvent = housekeepingEntitiesToBeScheduled.get(); List housekeepingEntities = beekeeperEvent.getHousekeepingEntities(); @@ -65,13 +63,15 @@ public void scheduleBeekeeperEvent() { } catch (Exception e) { throw new BeekeeperException(format( "Unable to schedule %s deletion for entity, this message will go back on the queue", - entity.getLifecycleType()), e); + entity.getLifecycleType()), + e); } } + beekeeperEventReader.delete(beekeeperEvent); } public void close() throws IOException { beekeeperEventReader.close(); } -} +} \ No newline at end of file