qingwli commented on code in PR #15163:
URL: 
https://github.com/apache/dolphinscheduler/pull/15163#discussion_r1395337820


##########
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertServer.java:
##########
@@ -60,13 +61,17 @@ public static void main(String[] args) {
 
     @EventListener
     public void run(ApplicationReadyEvent readyEvent) {
-        log.info("Alert server is staring ...");
         alertPluginManager.start();
-        alertRegistryClient.start();
-        alertBootstrapService.start();
-        listenerEventPostService.start();
-        alertRpcServer.start();
-        log.info("Alert server is started ...");
+
+        if (this.getClass().getName()
+                .contains(((SpringApplication) 
readyEvent.getSource()).getMainApplicationClass().getName())) {
+            log.info("Alert server is staring ...");
+            alertRegistryClient.start();
+            alertBootstrapService.start();
+            listenerEventPostService.start();
+            alertRpcServer.start();
+            log.info("Alert server is started ...");
+        }

Review Comment:
   Pre-design is to import the alert server in API-server, which will run the 
alert server auto, I just need the alert plugin manager and not need another 
component, so add this code. But change to use rpc does not need this change.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to