fix: simplify ReloadPlugins - remove redundant deactivate loop
- SyncConfig already sets Active correctly from config - InitRuntimes only processes Active plugins - No need for separate deactivate pass
This commit is contained in:
@@ -227,13 +227,6 @@ func (a *App) ReloadPlugins() error {
|
||||
appCfg, _ := config.LoadAppConfig()
|
||||
a.plugins.SyncConfig(appCfg)
|
||||
|
||||
// Apply enable/disable state from config: deactivate everything not in enabled set
|
||||
for _, p := range a.plugins.Plugins() {
|
||||
if !p.Active || !p.Installed {
|
||||
a.plugins.DeactivatePlugin(p.Meta.Name)
|
||||
}
|
||||
}
|
||||
|
||||
a.plugins.InitRuntimes()
|
||||
a.plugins.CallInitHooks()
|
||||
a.plugins.StartSchedulers()
|
||||
|
||||
Reference in New Issue
Block a user