Stop plugin healthchecks before shutting down plugins (#11972)
* cancel plugin check when shutdown * move to top * stop healthcheck job only once, and if started * whitespace
Этот коммит содержится в:
коммит произвёл
Saturnino Abril
родитель
2980d341d4
Коммит
9e9f1bb2aa
@@ -284,6 +284,10 @@ func (env *Environment) RestartPlugin(id string) error {
|
||||
|
||||
// Shutdown deactivates all plugins and gracefully shuts down the environment.
|
||||
func (env *Environment) Shutdown() {
|
||||
if env.pluginHealthCheckJob != nil {
|
||||
env.pluginHealthCheckJob.Cancel()
|
||||
}
|
||||
|
||||
env.registeredPlugins.Range(func(key, value interface{}) bool {
|
||||
rp := value.(*registeredPlugin)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user