Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public static WorkerFactoryOptions getDefaultInstance() {
private static final int DEFAULT_HOST_LOCAL_WORKFLOW_POLL_THREAD_COUNT = 5;
private static final int DEFAULT_WORKFLOW_CACHE_SIZE = 600;
private static final int DEFAULT_MAX_WORKFLOW_THREAD_COUNT = 600;
private static final Duration DEFAULT_STICKY_SCHEDULE_TO_START_TIMEOUT = Duration.ofSeconds(5);

private static final WorkerFactoryOptions DEFAULT_INSTANCE;

Expand All @@ -49,6 +50,7 @@ public static WorkerFactoryOptions getDefaultInstance() {
}

public static class Builder {

private Duration workflowHostLocalTaskQueueScheduleToStartTimeout;
private int workflowCacheSize;
private int maxWorkflowThreadCount;
Expand Down Expand Up @@ -185,6 +187,9 @@ private WorkerFactoryOptions(
!workflowHostLocalTaskQueueScheduleToStartTimeout.isNegative(),
"negative workflowHostLocalTaskQueueScheduleToStartTimeoutSeconds");
}
if (workflowHostLocalTaskQueueScheduleToStartTimeout == null) {
workflowHostLocalTaskQueueScheduleToStartTimeout = DEFAULT_STICKY_SCHEDULE_TO_START_TIMEOUT;
}
if (workflowInterceptors == null) {
workflowInterceptors = new WorkflowInterceptor[0];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ public WorkflowStub newUntypedWorkflowStub(
WorkerFactoryOptions.newBuilder()
.setWorkflowInterceptors(tracer)
.setActivityInterceptors(activityInterceptor)
.setWorkflowHostLocalTaskQueueScheduleToStartTimeout(Duration.ZERO)
.setWorkflowHostLocalTaskQueueScheduleToStartTimeout(
versionTest ? Duration.ZERO : Duration.ofSeconds(10))
.build();
Expand Down