Tianqi-Dotes commented on code in PR #9559:
URL: https://github.com/apache/dolphinscheduler/pull/9559#discussion_r851996966
##########
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DataAnalysisServiceImpl.java:
##########
@@ -165,14 +166,25 @@ private Map<String, Object> countStateByProject(User
loginUser, long projectCode
List<ExecuteStatusCount> processInstanceStateCounts = new
ArrayList<>();
Long[] projectCodeArray = projectCode == 0 ?
getProjectCodesArrays(loginUser)
- : new Long[] {projectCode};
+ : new Long[]{projectCode};
if (projectCodeArray.length != 0 || loginUser.getUserType() ==
UserType.ADMIN_USER) {
processInstanceStateCounts = instanceStateCounter.apply(start,
end, projectCodeArray);
}
if (processInstanceStateCounts != null) {
TaskCountDto taskCountResult = new
TaskCountDto(processInstanceStateCounts);
+ int recount = 0;
+ for (TaskStateCount taskCountDto :
taskCountResult.getTaskCountDtos()) {
+ if (taskCountDto.getCount() == 0) {
+ //use submit time to recount when 0
+ //if have any issues with this code should change to
specified states 0 8 9 17 not state count is 0
+ int count =
taskInstanceMapper.countTaskInstanceStateByProjectCodesAndState(start, end,
projectCodeArray, taskCountDto.getTaskStateType().getCode());
Review Comment:
will do
--
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]