Skip to content

Commit

Permalink
feat(payments): add max activity max pollers setting
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-nicolas committed Jan 9, 2025
1 parent 79c51cb commit 1a2c75a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/09-Configuration reference/01-Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ While we have some basic types (string, number, bool ...), we also have some com
| ledger.experimental-numscript-interpreter | Bool | true | Enable new numscript interpreter |
| payments.encryption-key | string | | Payments data encryption key |
| payments.worker.temporal-max-concurrent-workflow-task-pollers | Int | | Payments worker max concurrent workflow task pollers configuration |
| payments.worker.temporal-max-concurrent-activity-task-pollers | Int | | Payments worker max concurrent activity task pollers configuration |
| deployments.`<deployment-name>`.init-containers.`<container-name>`.resource-requirements | Map | cpu=X, mem=X | |
| deployments.`<deployment-name>`.containers.`<container-name>`.resource-requirements | Map | cpu=X, mem=X | |
| deployments.`<deployment-name>`.init-containers.`<container-name>`.run-as | Map | user=X, group=X | |
Expand Down
6 changes: 6 additions & 0 deletions internal/resources/payments/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,14 @@ func temporalEnvVars(ctx core.Context, stack *v1beta1.Stack, payments *v1beta1.P
return nil, err
}

temporalMaxConcurrentActivityTaskPollers, err := settings.GetIntOrDefault(ctx, stack.Name, 4, "payments", "worker", "temporal-max-concurrent-activity-task-pollers")
if err != nil {
return nil, err
}

env = append(env,
core.Env("TEMPORAL_MAX_CONCURRENT_WORKFLOW_TASK_POLLERS", fmt.Sprintf("%d", temporalMaxConcurrentWorkflowTaskPollers)),
core.Env("TEMPORAL_MAX_CONCURRENT_ACTIVITY_TASK_POLLERS", fmt.Sprintf("%d", temporalMaxConcurrentActivityTaskPollers)),
)

return env, nil
Expand Down

0 comments on commit 1a2c75a

Please sign in to comment.