Skip to content

Commit

Permalink
[type:bugfix] fix sync all error
Browse files Browse the repository at this point in the history
  • Loading branch information
Aias00 committed Nov 9, 2024
1 parent b9f18c8 commit a17be3a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ public class WebsocketDataChangedListener implements DataChangedListener {
public void onPluginChanged(final List<PluginData> pluginDataList, final DataEventTypeEnum eventType) {
WebsocketData<PluginData> websocketData =
new WebsocketData<>(ConfigGroupEnum.PLUGIN.name(), eventType.name(), pluginDataList);
String namespaceId = pluginDataList.stream().map(value -> StringUtils.defaultString(value.getNamespaceId(), SYS_DEFAULT_NAMESPACE_ID)).findFirst().get();
WebsocketCollector.send(namespaceId, GsonUtils.getInstance().toJson(websocketData), eventType);
if (CollectionUtils.isNotEmpty(pluginDataList)) {
String namespaceId = pluginDataList.stream().map(value -> StringUtils.defaultString(value.getNamespaceId(), SYS_DEFAULT_NAMESPACE_ID)).findFirst().get();
WebsocketCollector.send(namespaceId, GsonUtils.getInstance().toJson(websocketData), eventType);
}
}

@Override
Expand Down

0 comments on commit a17be3a

Please sign in to comment.