[MM-15831] Improve system for storing status of available plug… (#11185)

* Move State property from activePlugin to PluginHealthStatus. env.activePlugins is now reserved for healthy running plugins.

* Add comments for function declarations

* Combine activePlugins and pluginHealthStatuses into a common structure, registeredPlugins

* Add check to see if plugin is active before deactivating it

* Make `Deactivate` set plugin status

* Add comment explaining the `registeredPlugins` map
* Give responsibility to set plugin disabled status upon deactivation back to `env.Deactivate`

* check if plugin needs to be deactivated before setting status
Этот коммит содержится в:
Michael Kochell
2019-06-25 17:44:08 -04:00
коммит произвёл GitHub
родитель 332b53a30d
Коммит b68194e035
5 изменённых файлов: 124 добавлений и 115 удалений

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

@@ -130,6 +130,7 @@ func (a *App) removePlugin(id string) *model.AppError {
}
pluginsEnvironment.Deactivate(id)
pluginsEnvironment.RemovePlugin(id)
a.UnregisterPluginCommands(id)
err = os.RemoveAll(pluginPath)