[MM-24753] Improves error message when plugin crashes during slash command (#15334)

Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
Ashim Sedhain
2020-10-02 03:02:58 -05:00
коммит произвёл GitHub
родитель 51d790300f
Коммит 2f47cf5994
5 изменённых файлов: 113 добавлений и 3 удалений

Просмотреть файл

@@ -472,8 +472,8 @@ func (env *Environment) RunMultiPluginHook(hookRunnerFunc func(hooks Hooks) bool
}
}
// performHealthCheck uses the active plugin's supervisor to verify if the plugin has crashed.
func (env *Environment) performHealthCheck(id string) error {
// PerformHealthCheck uses the active plugin's supervisor to verify if the plugin has crashed.
func (env *Environment) PerformHealthCheck(id string) error {
p, ok := env.registeredPlugins.Load(id)
if !ok {
return nil

Просмотреть файл

@@ -51,7 +51,7 @@ func (job *PluginHealthCheckJob) run() {
// If the plugin passes the health check, do nothing.
// If the plugin fails the health check, the function either restarts or deactivates the plugin, based on the quantity and frequency of its failures.
func (job *PluginHealthCheckJob) CheckPlugin(id string) {
err := job.env.performHealthCheck(id)
err := job.env.PerformHealthCheck(id)
if err == nil {
return
}