Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-25 17:24:24 +08:00
parent a8f56e55e3
commit 957a928959
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
6 changed files with 82 additions and 19 deletions

View file

@ -1690,7 +1690,7 @@ func processSyncMergeResult(exit, byHand bool, mergeResult *dejavu.MergeResult,
}
if needReloadPlugin {
pushReloadPlugin(upsertPluginSet, removePluginSet)
pushReloadPlugin(upsertPluginSet, removePluginSet, "")
}
for _, widgetDir := range removeWidgetDirSet.Values() {
@ -2258,19 +2258,3 @@ func getCloudSpace() (stat *cloud.Stat, err error) {
}
return
}
func pushReloadPlugin(upsertPluginSet, removePluginNameSet *hashset.Set) {
upsertPlugins, removePlugins := []string{}, []string{}
for _, n := range upsertPluginSet.Values() {
upsertPlugins = append(upsertPlugins, n.(string))
}
for _, n := range removePluginNameSet.Values() {
removePlugins = append(removePlugins, n.(string))
}
logging.LogInfof("reload plugins [upserts=%v, removes=%v]", upsertPlugins, removePlugins)
util.BroadcastByType("main", "reloadPlugin", 0, "", map[string]interface{}{
"upsertPlugins": upsertPlugins,
"removePlugins": removePlugins,
})
}