Drop IDOrderDesc for listing Actions task and always order by id DESC (#31150)

Close #31066

Just follow what `FindRunOptions` and `FindScheduleOptions` do.
This commit is contained in:
Jason Song authored and GitHub committed 2024-05-31 02:30:02 +00:00
1 parent 1137a0357e
commit 572fa55fbc
2 files changed
+3 -8

No files matched your search

+1 -5
View File
@@ -54,7 +54,6 @@ type FindTaskOptions struct {
UpdatedBefore timeutil.TimeStamp
StartedBefore timeutil.TimeStamp
RunnerID int64
IDOrderDesc bool
}
func (opts FindTaskOptions) ToConds() builder.Cond {
@@ -84,8 +83,5 @@ func (opts FindTaskOptions) ToConds() builder.Cond {
}
func (opts FindTaskOptions) ToOrders() string {
if opts.IDOrderDesc {
return "`id` DESC"
}
return ""
return "`id` DESC"
}