File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
main/java/io/temporal/worker
test/java/io/temporal/workflow Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public static WorkerFactoryOptions getDefaultInstance() {
4141 private static final int DEFAULT_HOST_LOCAL_WORKFLOW_POLL_THREAD_COUNT = 5 ;
4242 private static final int DEFAULT_WORKFLOW_CACHE_SIZE = 600 ;
4343 private static final int DEFAULT_MAX_WORKFLOW_THREAD_COUNT = 600 ;
44+ private static final Duration DEFAULT_STICKY_SCHEDULE_TO_START_TIMEOUT = Duration .ofSeconds (5 );
4445
4546 private static final WorkerFactoryOptions DEFAULT_INSTANCE ;
4647
@@ -49,6 +50,7 @@ public static WorkerFactoryOptions getDefaultInstance() {
4950 }
5051
5152 public static class Builder {
53+
5254 private Duration workflowHostLocalTaskQueueScheduleToStartTimeout ;
5355 private int workflowCacheSize ;
5456 private int maxWorkflowThreadCount ;
@@ -185,6 +187,9 @@ private WorkerFactoryOptions(
185187 !workflowHostLocalTaskQueueScheduleToStartTimeout .isNegative (),
186188 "negative workflowHostLocalTaskQueueScheduleToStartTimeoutSeconds" );
187189 }
190+ if (workflowHostLocalTaskQueueScheduleToStartTimeout == null ) {
191+ workflowHostLocalTaskQueueScheduleToStartTimeout = DEFAULT_STICKY_SCHEDULE_TO_START_TIMEOUT ;
192+ }
188193 if (workflowInterceptors == null ) {
189194 workflowInterceptors = new WorkflowInterceptor [0 ];
190195 }
Original file line number Diff line number Diff line change @@ -325,6 +325,7 @@ public WorkflowStub newUntypedWorkflowStub(
325325 WorkerFactoryOptions .newBuilder ()
326326 .setWorkflowInterceptors (tracer )
327327 .setActivityInterceptors (activityInterceptor )
328+ .setWorkflowHostLocalTaskQueueScheduleToStartTimeout (Duration .ZERO )
328329 .setWorkflowHostLocalTaskQueueScheduleToStartTimeout (
329330 versionTest ? Duration .ZERO : Duration .ofSeconds (10 ))
330331 .build ();
You can’t perform that action at this time.
0 commit comments