ywj1352 commented on code in PR #5596: URL: https://github.com/apache/shenyu/pull/5596#discussion_r1684220918
########## shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/UpstreamCheckService.java: ########## @@ -456,30 +461,20 @@ public void fetchUpstreamData() { } /** - * listen {@link SelectorCreatedEvent} add data permission. - * - * @param event event - */ - @EventListener(SelectorCreatedEvent.class) - public void onSelectorCreated(final SelectorCreatedEvent event) { - final PluginDO plugin = pluginMapper.selectById(event.getSelector().getPluginId()); - List<DivideUpstream> existDivideUpstreams = SelectorUtil.buildDivideUpstream(event.getSelector(), plugin.getName()); - if (CollectionUtils.isNotEmpty(existDivideUpstreams)) { - replace(event.getSelector().getId(), CommonUpstreamUtils.convertCommonUpstreamList(existDivideUpstreams)); - } - } - - /** - * listen {@link SelectorCreatedEvent} add data permission. + * listen {@link DiscoveryStreamUpdatedEvent} add data permission. * * @param event event */ - @EventListener(SelectorUpdatedEvent.class) Review Comment: this Event just Work Update Seletor#handler. Management of Upstream just change to ` eventPublisher.publishEvent(new DataChangedEvent(ConfigGroupEnum.DISCOVER_UPSTREAM, DataEventTypeEnum.UPDATE, Collections.singletonList(discoverySyncData)));` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@shenyu.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org