Adding Concurrency in Pool Manager (#1698)
Concurrency in the pool manager allows specializing pods concurrently based on a specified limit. Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
This commit is contained in:
@@ -41,6 +41,7 @@ import (
|
||||
const (
|
||||
DEFAULT_MIN_SCALE = 1
|
||||
DEFAULT_TARGET_CPU_PERCENTAGE = 80
|
||||
DEFAULT_CONCURRENCY = 5
|
||||
)
|
||||
|
||||
type CreateSubCommand struct {
|
||||
@@ -96,6 +97,11 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
|
||||
fnIdleTimeout := input.Int(flagkey.FnIdleTimeout)
|
||||
|
||||
fnConcurrency := DEFAULT_CONCURRENCY
|
||||
if input.IsSet(flagkey.FnConcurrency) {
|
||||
fnConcurrency = input.Int(flagkey.FnConcurrency)
|
||||
}
|
||||
|
||||
pkgName := input.String(flagkey.FnPackageName)
|
||||
|
||||
secretNames := input.StringSlice(flagkey.FnSecret)
|
||||
@@ -294,6 +300,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
InvokeStrategy: *invokeStrategy,
|
||||
FunctionTimeout: fnTimeout,
|
||||
IdleTimeout: &fnIdleTimeout,
|
||||
Concurrency: fnConcurrency,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user