Skip to content

Commit 471c2d5

Browse files
Sorted task list (#366)
GitOrigin-RevId: 3ef4f738e1b9cc7f830a89ec6d85d0637439e56b
1 parent fd0c2bc commit 471c2d5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

pkg/workflows/apiserver/internal/handler.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package internal
33
import (
44
"context"
55
"slices"
6+
"sort"
67

78
"github.com/render-oss/cli/pkg/client"
89
logclient "github.com/render-oss/cli/pkg/client/logs"
@@ -16,6 +17,10 @@ import (
1617
func ListTasks(store *store.TaskStore) []*client.TaskWithCursor {
1718
tasks := store.GetTasks()
1819

20+
sort.Slice(tasks, func(i, j int) bool {
21+
return tasks[i].ID < tasks[j].ID
22+
})
23+
1924
taskList := make([]*client.TaskWithCursor, len(tasks))
2025
for i, task := range tasks {
2126
taskList[i] = &client.TaskWithCursor{

0 commit comments

Comments
 (0)