Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新2.2.2版本后,原来的HeartBeatEvent无法触发 #1728

Closed
linzhiqiang0514 opened this issue Sep 14, 2020 · 0 comments · Fixed by #1729
Closed

更新2.2.2版本后,原来的HeartBeatEvent无法触发 #1728

linzhiqiang0514 opened this issue Sep 14, 2020 · 0 comments · Fixed by #1729
Assignees
Milestone

Comments

@linzhiqiang0514
Copy link

linzhiqiang0514 commented Sep 14, 2020

我们鼓励使用英文,如果不能直接使用,可以使用翻译软件,您仍旧可以保留中文原文。
We recommend using English. If you are non-native English speaker, you can use the translation software.

Which Component
eg. Nacos Discovery, Sentinel
Discovery组件

Describe what problem you have encountered
A clear and concise description of what you want to do.
NacosWatch更新后,去除了TaskScheduler,原来基于HeartBeatEventListener的事件,都无法触发

/**
     * nacos事件监听
     *
     * @param heartbeatEvent
     */
    @EventListener(classes = HeartbeatEvent.class)
    public void listenEvent(ApplicationEvent heartbeatEvent) {
        // 没有启动完毕先等待
        if (!isStartupCompleted) {
            lock.lock();
            try {
                condition.await();
            } catch (InterruptedException e) {
                log.error("condition.await() error", e);
            } finally {
                lock.unlock();
            }
        }
        registryListener.onEvent(heartbeatEvent);
    }

Describe what information you have read
eg. I have read the reference doc of Sentinel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants