Skip to content

Commit

Permalink
Make worker concurrent sessions configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielCosme committed Jun 4, 2024
1 parent 4ca9fb0 commit 5bf6c7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions enduro.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ disabled = true
processNameMetadata = false

[worker]
maxCuncurrentSessions = 1000
heartbeatThrottleInterval = "60s"

[workflow]
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func main() {
done := make(chan struct{})
w := temporalsdk_worker.New(temporalClient, config.Temporal.TaskQueue, temporalsdk_worker.Options{
EnableSessionWorker: true,
MaxConcurrentSessionExecutionSize: 5000,
MaxConcurrentSessionExecutionSize: config.Worker.MaxConcurrentSessions,
MaxHeartbeatThrottleInterval: config.Worker.HeartbeatThrottleInterval,
DefaultHeartbeatThrottleInterval: config.Worker.HeartbeatThrottleInterval,
})
Expand Down Expand Up @@ -403,6 +403,7 @@ type configuration struct {

type WorkerConfig struct {
HeartbeatThrottleInterval time.Duration
MaxConcurrentSessions int
}

func (c configuration) Validate() error {
Expand Down

0 comments on commit 5bf6c7f

Please sign in to comment.