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) }