Skip to content

Commit

Permalink
taskPollTimeout should be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jmigueprieto committed Sep 10, 2024
1 parent 69e02bd commit 0812765
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public class ClientProperties {

private int shutdownGracePeriodSeconds = 10;

private int taskPollTimeout = 100;

public String getRootUri() {
return rootUri;
}
Expand Down Expand Up @@ -100,4 +102,12 @@ public Map<String, Integer> getTaskThreadCount() {
public void setTaskThreadCount(Map<String, Integer> taskThreadCount) {
this.taskThreadCount = taskThreadCount;
}

public int getTaskPollTimeout() {
return taskPollTimeout;
}

public void setTaskPollTimeout(int taskPollTimeout) {
this.taskPollTimeout = taskPollTimeout;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ public TaskRunnerConfigurer taskRunnerConfigurer(Environment env,
} else {
clientProperties.setTaskThreadCount(taskThreadCount);
}

return new TaskRunnerConfigurer.Builder(taskClient, workers)
.withTaskThreadCount(clientProperties.getTaskThreadCount())
.withThreadCount(clientProperties.getThreadCount())
.withSleepWhenRetry((int) clientProperties.getSleepWhenRetryDuration().toMillis())
.withUpdateRetryCount(clientProperties.getUpdateRetryCount())
.withTaskToDomain(clientProperties.getTaskToDomain())
.withShutdownGracePeriodSeconds(clientProperties.getShutdownGracePeriodSeconds())
.withTaskPollTimeout(clientProperties.getTaskPollTimeout())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=3.0.0-alpha14-SNAPSHOT
version=3.0.0-alpha15-SNAPSHOT

0 comments on commit 0812765

Please sign in to comment.