mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: New timeout for LB Placer (#1137)
* fn: New timeout for LB Placer Previously, LB Placers worked hard as long as client contexts allowed for. Adding a Placer config setting to bound this by 360 seconds by default. The new timeout is not accounted during actual function execution and only applies to the amount of wait time in Placers when the call is not being executed.
This commit is contained in:
@@ -586,12 +586,13 @@ func WithAgentFromEnv() Option {
|
||||
}
|
||||
|
||||
// Select the placement algorithm
|
||||
placerCfg := pool.NewPlacerConfig()
|
||||
var placer pool.Placer
|
||||
switch getEnv(EnvLBPlacementAlg, "") {
|
||||
case "ch":
|
||||
placer = pool.NewCHPlacer()
|
||||
placer = pool.NewCHPlacer(&placerCfg)
|
||||
default:
|
||||
placer = pool.NewNaivePlacer()
|
||||
placer = pool.NewNaivePlacer(&placerCfg)
|
||||
}
|
||||
|
||||
keys := []string{"fn_appname", "fn_path"}
|
||||
|
||||
Reference in New Issue
Block a user