Skip to content

Commit 22bad5a

Browse files
committed
Reduce default polling interval to 200ms
1 parent f30dffb commit 22bad5a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/worker/options.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ type Options struct {
3535

3636
// WorkflowPollingInterval is the interval between polling for new workflow tasks.
3737
// Note that if you use a backend that can wait for tasks to be available (e.g. redis) this field has no effect.
38-
// Defaults to 1 second.
38+
// Defaults to 200ms.
3939
WorkflowPollingInterval time.Duration
4040

4141
// ActivityPollingInterval is the interval between polling for new activity tasks.
4242
// Note that if you use a backend that can wait for tasks to be available (e.g. redis) this field has no effect.
43-
// Defaults to 1 second.
43+
// Defaults to 200ms.
4444
ActivityPollingInterval time.Duration
4545

4646
// WorkflowExecutorCache is the max size of the workflow executor cache. Defaults to 128
@@ -61,8 +61,8 @@ var DefaultOptions = Options{
6161
MaxParallelActivityTasks: 0,
6262
ActivityHeartbeatInterval: 25 * time.Second,
6363
WorkflowHeartbeatInterval: 25 * time.Second,
64-
WorkflowPollingInterval: time.Second,
65-
ActivityPollingInterval: time.Second,
64+
WorkflowPollingInterval: 200 * time.Millisecond,
65+
ActivityPollingInterval: 200 * time.Millisecond,
6666

6767
WorkflowExecutorCacheSize: 128,
6868
WorkflowExecutorCacheTTL: time.Second * 10,

0 commit comments

Comments
 (0)