Skip to content

Commit

Permalink
reduce number of places where defaults can be defined
Browse files Browse the repository at this point in the history
  • Loading branch information
erikpetzold committed Nov 17, 2023
1 parent 9cc7702 commit f334a32
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ public class IntervalCheck {
@Nullable
private Scheduler scheduler;

public IntervalCheck(String name, Function<InstanceId, Mono<Void>> checkFn) {
this(name, checkFn, Duration.ofSeconds(10), Duration.ofSeconds(10), Duration.ofSeconds(60));
}

public IntervalCheck(String name, Function<InstanceId, Mono<Void>> checkFn, Duration interval,
Duration minRetention, Duration maxBackoff) {
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class StatusUpdateTrigger extends AbstractEventHandler<InstanceEvent> {
public StatusUpdateTrigger(StatusUpdater statusUpdater, Publisher<InstanceEvent> 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
Expand Down

0 comments on commit f334a32

Please sign in to comment.