Add independent environment reload
in the case that the prewarming pool is depleting (see PrewarmingPoolThreshold) and is still depleting after a timeout (PrewarmingPoolReloadTimeout).
This commit is contained in:

committed by
Sebastian Serth

parent
c46a09eeae
commit
543939e5cb
@@ -30,7 +30,7 @@ func Health(manager environment.Manager) http.HandlerFunc {
|
||||
func checkPrewarmingPool(manager environment.Manager) error {
|
||||
var depletingEnvironments []int
|
||||
for _, data := range manager.Statistics() {
|
||||
if float64(data.IdleRunners)/float64(data.PrewarmingPoolSize) < config.Config.Server.PrewarmingPoolAlertThreshold {
|
||||
if float64(data.IdleRunners)/float64(data.PrewarmingPoolSize) < config.Config.Server.Alert.PrewarmingPoolThreshold {
|
||||
depletingEnvironments = append(depletingEnvironments, data.ID)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user