You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by we...@apache.org on 2022/12/13 08:36:01 UTC
[dolphinscheduler] branch dev updated: [Improvement][ApiServer]Task defination list paging sorted by updateTime not effect (#12622)
This is an automated email from the ASF dual-hosted git repository.
wenjun pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 0db1bb6ba8 [Improvement][ApiServer]Task defination list paging sorted by updateTime not effect (#12622)
0db1bb6ba8 is described below
commit 0db1bb6ba8fcd503e215bbbf4a4529d94b2467fb
Author: xuhhui <sz...@163.com>
AuthorDate: Tue Dec 13 16:35:54 2022 +0800
[Improvement][ApiServer]Task defination list paging sorted by updateTime not effect (#12622)
---
.../dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
index 9a0f893974..b641d1d7f4 100644
--- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
+++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskDefinitionServiceImpl.java
@@ -1107,9 +1107,12 @@ public class TaskDefinitionServiceImpl extends BaseServiceImpl implements TaskDe
return v;
});
}
+
// because taskMainInfoMap's value is TaskMainInfo,
// TaskMainInfo have task code info, so only need gain taskMainInfoMap's values
- taskMainInfoIPage.setRecords(Lists.newArrayList(taskMainInfoMap.values()));
+ List<TaskMainInfo> resultRecords = Lists.newArrayList(taskMainInfoMap.values());
+ resultRecords.sort((o1, o2) -> o2.getTaskUpdateTime().compareTo(o1.getTaskUpdateTime()));
+ taskMainInfoIPage.setRecords(resultRecords);
}
}