From dbcc556bd2cfa0343ee0a206526c82ef3a58d5e5 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 14 Jan 2024 11:27:58 +0100 Subject: [PATCH] chore: Add additional debug logs --- .../timetable/bahnApi/service/ScheduledTaskService.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/ScheduledTaskService.kt b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/ScheduledTaskService.kt index 8675241..9e1561b 100644 --- a/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/ScheduledTaskService.kt +++ b/module-bahnApi/src/main/kotlin/de/twomartens/timetable/bahnApi/service/ScheduledTaskService.kt @@ -38,6 +38,7 @@ class ScheduledTaskService( @EventListener(ApplicationReadyEvent::class) fun onApplicationReady(event: ApplicationReadyEvent) { if (!leaderProperties.isEnabled) { + log.info { "Leader election disabled and application ready" } val updateTime = Instant.ofEpochMilli(event.timestamp) updateTaskCounterAndScheduleTasksIfLeader(updateTime) } @@ -45,6 +46,7 @@ class ScheduledTaskService( @EventListener(OnGrantedEvent::class) fun onLeadershipGranted(event: OnGrantedEvent) { + log.info { "Granted leadership" } val updateTime = Instant.ofEpochMilli(event.timestamp) updateTaskCounterAndScheduleTasksIfLeader(updateTime) }