shouwangyw commented on code in PR #16488:
URL:
https://github.com/apache/dolphinscheduler/pull/16488#discussion_r1726515101
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/utils/DependentExecute.java:
##########
@@ -337,18 +337,27 @@ private ProcessInstance findLastProcessInterval(Long
definitionCode, Long taskCo
}
/**
- * get dependent result by task/process instance state
+ * get dependent result by task/process instance
*
- * @param state state
+ * @param processInstance process instance
+ * @param taskInstance task instance
* @return DependResult
*/
- private DependResult getDependResultByState(TaskExecutionStatus state) {
+ private DependResult getDependResultOfTask(ProcessInstance
processInstance, TaskInstance taskInstance) {
+ TaskExecutionStatus state = taskInstance.getState();
if (!state.isFinished()) {
return DependResult.WAITING;
} else if (state.isSuccess()) {
return DependResult.SUCCESS;
} else {
+ log.info("Task code: {}, task name: {}, retryTimes: {},
maxRetryTimes: {}",
+ taskInstance.getTaskCode(), taskInstance.getName(),
taskInstance.getRetryTimes(),
+ taskInstance.getMaxRetryTimes());
+ if (processInstance.getState().isRunning()
+ && taskInstance.getRetryTimes() <
taskInstance.getMaxRetryTimes()) {
+ return DependResult.WAITING;
+ }
Review Comment:
Okay, this can prevent prolonged checks from printing a large amount of
duplicate logs
--
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]