From f334a321b8b8b2d6a678006927bcc2eb30d1f38c Mon Sep 17 00:00:00 2001 From: "erik.petzold" Date: Fri, 17 Nov 2023 08:53:42 +0100 Subject: [PATCH] reduce number of places where defaults can be defined --- .../codecentric/boot/admin/server/services/IntervalCheck.java | 4 ---- .../boot/admin/server/services/StatusUpdateTrigger.java | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/IntervalCheck.java b/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/IntervalCheck.java index 2343c0eac88..4bb1850e0a5 100644 --- a/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/IntervalCheck.java +++ b/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/IntervalCheck.java @@ -68,10 +68,6 @@ public class IntervalCheck { @Nullable private Scheduler scheduler; - public IntervalCheck(String name, Function> checkFn) { - this(name, checkFn, Duration.ofSeconds(10), Duration.ofSeconds(10), Duration.ofSeconds(60)); - } - public IntervalCheck(String name, Function> checkFn, Duration interval, Duration minRetention, Duration maxBackoff) { this.name = name; diff --git a/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/StatusUpdateTrigger.java b/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/StatusUpdateTrigger.java index 446886c257d..6f78ee93e1d 100644 --- a/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/StatusUpdateTrigger.java +++ b/spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/services/StatusUpdateTrigger.java @@ -40,7 +40,7 @@ public class StatusUpdateTrigger extends AbstractEventHandler { public StatusUpdateTrigger(StatusUpdater statusUpdater, Publisher publisher) { super(publisher, InstanceEvent.class); this.statusUpdater = statusUpdater; - this.intervalCheck = new IntervalCheck("status", this::updateStatus); + this.intervalCheck = new IntervalCheck("status", this::updateStatus, Duration.ofSeconds(10), Duration.ofSeconds(10), Duration.ofSeconds(60)); } @Override