mirror of
https://github.com/2martens/tsw-timetable.git
synced 2026-10-17 16:06:51 +02:00
chore: Add additional debug logs
This commit is contained in:
+2
@@ -38,6 +38,7 @@ class ScheduledTaskService(
|
|||||||
@EventListener(ApplicationReadyEvent::class)
|
@EventListener(ApplicationReadyEvent::class)
|
||||||
fun onApplicationReady(event: ApplicationReadyEvent) {
|
fun onApplicationReady(event: ApplicationReadyEvent) {
|
||||||
if (!leaderProperties.isEnabled) {
|
if (!leaderProperties.isEnabled) {
|
||||||
|
log.info { "Leader election disabled and application ready" }
|
||||||
val updateTime = Instant.ofEpochMilli(event.timestamp)
|
val updateTime = Instant.ofEpochMilli(event.timestamp)
|
||||||
updateTaskCounterAndScheduleTasksIfLeader(updateTime)
|
updateTaskCounterAndScheduleTasksIfLeader(updateTime)
|
||||||
}
|
}
|
||||||
@@ -45,6 +46,7 @@ class ScheduledTaskService(
|
|||||||
|
|
||||||
@EventListener(OnGrantedEvent::class)
|
@EventListener(OnGrantedEvent::class)
|
||||||
fun onLeadershipGranted(event: OnGrantedEvent) {
|
fun onLeadershipGranted(event: OnGrantedEvent) {
|
||||||
|
log.info { "Granted leadership" }
|
||||||
val updateTime = Instant.ofEpochMilli(event.timestamp)
|
val updateTime = Instant.ofEpochMilli(event.timestamp)
|
||||||
updateTaskCounterAndScheduleTasksIfLeader(updateTime)
|
updateTaskCounterAndScheduleTasksIfLeader(updateTime)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user