Skip to content

Commit 8e7e9c5

Browse files
authored
Fix Go worker autoscale behavior (#253)
## What was changed Set InitialNumberOfPollers in Go PollerBehaviorAutoscalingOptions to work around temporalio/sdk-go#2105. ## Why? Be able to autoscale pollers.
1 parent 91dbf54 commit 8e7e9c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

workers/go/worker/worker.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ func (a *App) Run(cmd *cobra.Command, args []string) {
5656
func makePollerBehavior(simple, auto int) worker.PollerBehavior {
5757
if auto > 0 {
5858
return worker.NewPollerBehaviorAutoscaling(worker.PollerBehaviorAutoscalingOptions{
59+
// TODO: remove InitialNumberOfPollers after https://github.com/temporalio/sdk-go/pull/2105
60+
InitialNumberOfPollers: auto,
5961
MaximumNumberOfPollers: auto,
6062
})
6163
}

0 commit comments

Comments
 (0)