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:
Rahul Bhati
2020-09-16 18:48:08 +05:30
committed by GitHub
co-authored by Vishal
parent c1ac7fcd38
commit f3fe3123b3
25 changed files with 659 additions and 402 deletions
+7
View File
@@ -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,
},
}