DarkAssassinator commented on code in PR #12881:
URL:
https://github.com/apache/dolphinscheduler/pull/12881#discussion_r1020899844
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -235,36 +236,19 @@ public class WorkflowExecuteRunnable implements
Callable<WorkflowSubmitStatue> {
/**
* @param processInstance processInstance
- * @param processService processService
- * @param processInstanceDao processInstanceDao
- * @param nettyExecutorManager nettyExecutorManager
- * @param processAlertManager processAlertManager
- * @param masterConfig masterConfig
- * @param stateWheelExecuteThread stateWheelExecuteThread
*/
- public WorkflowExecuteRunnable(
- @NonNull ProcessInstance processInstance,
- @NonNull CommandService commandService,
- @NonNull ProcessService processService,
- @NonNull ProcessInstanceDao
processInstanceDao,
- @NonNull NettyExecutorManager
nettyExecutorManager,
- @NonNull ProcessAlertManager
processAlertManager,
- @NonNull MasterConfig masterConfig,
- @NonNull StateWheelExecuteThread
stateWheelExecuteThread,
- @NonNull CuringParamsService
curingParamsService,
- @NonNull TaskInstanceDao taskInstanceDao,
- @NonNull TaskDefinitionLogDao
taskDefinitionLogDao) {
- this.processService = processService;
- this.commandService = commandService;
- this.processInstanceDao = processInstanceDao;
+ public WorkflowExecuteRunnable(@NonNull ProcessInstance processInstance) {
+ this.processService =
SpringApplicationContext.getBean(ProcessService.class);
Review Comment:
> This is not a good idea to do this change, `WorkflowExecuteRunnable` is
not a spring bean, it shouldn't rely spring.
Becuase current all `WorkflowExecuteRunnable` params are spring bean, so i
think that we add `SpringApplicationContext` just change another way to get
these params. If we should keep `WorkflowExecuteRunnable` clear, may we can
migrate all DAO related method to other holder service, but this will lead to
too scattered logic. Becuase more and more long params is a bad practies. WDYT.
--
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]