You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/04/06 08:16:26 UTC

[GitHub] [dolphinscheduler] zhuangchong commented on a diff in pull request #9246: [Fix-9221] [alert-server] optimization and gracefully close

zhuangchong commented on code in PR #9246:
URL: https://github.com/apache/dolphinscheduler/pull/9246#discussion_r843631721


##########
dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertPluginManager.java:
##########
@@ -53,25 +52,22 @@
 public final class AlertPluginManager {
     private static final Logger logger = LoggerFactory.getLogger(AlertPluginManager.class);
 
-    private final PluginDao pluginDao;
+    @Autowired
+    private PluginDao pluginDao;
 
     private final Map<Integer, AlertChannel> channelKeyedById = new HashMap<>();
 
     private final PluginParams warningTypeParams = getWarningTypeParams();
 
-    public AlertPluginManager(PluginDao pluginDao) {
-        this.pluginDao = pluginDao;
-    }
-

Review Comment:
   I recommend keeping the original constructor injection and see what other small partners have suggestions.



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org