Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #38 from spotify/delays
Browse files Browse the repository at this point in the history
Add setter for RetryUtil in scheduler builder
  • Loading branch information
rouzwawi authored Jan 12, 2017
2 parents dc5fd68 + 4ef4e24 commit 3dd7949
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public class StyxScheduler implements AppInit {
public static final int SCHEDULER_TICK_INTERVAL_SECONDS = 2;
public static final int TRIGGER_MANAGER_TICK_INTERVAL_SECONDS = 1;
public static final Duration DEFAULT_RETRY_BASE_DELAY = Duration.ofMinutes(3);
public static final int DEFAULT_RETRY_MAX_EXPONENT = 6;
public static final int DEFAULT_RETRY_MAX_EXPONENT = 4;
public static final Duration DEFAULT_RETRY_BASE_DELAY_BT = Duration.ofSeconds(1);
public static final RetryUtil DEFAULT_RETRY_UTIL =
new RetryUtil(DEFAULT_RETRY_BASE_DELAY, DEFAULT_RETRY_MAX_EXPONENT);
Expand Down Expand Up @@ -198,6 +198,11 @@ public Builder setPublisherFactory(PublisherFactory publisherFactory) {
return this;
}

public Builder setRetryUtil(RetryUtil retryUtil) {
this.retryUtil = retryUtil;
return this;
}

public StyxScheduler build() {
return new StyxScheduler(
time,
Expand Down

0 comments on commit 3dd7949

Please sign in to comment.