mirror of
https://github.com/go-gitea/gitea.git
synced 2026-01-20 00:41:40 +01:00
fix paging
This commit is contained in:
parent
6cca172a65
commit
8699c5a30d
@ -260,7 +260,7 @@ func CreateTaskForRunner(ctx context.Context, runner *ActionRunner) (*ActionTask
|
||||
for page := 0; job == nil; page++ {
|
||||
var jobs []*ActionRunJob
|
||||
// Load only 10 job in a batch without all fields for memory / db load reduction
|
||||
if err := e.Where("task_id=? AND status=? AND updated>=?", 0, StatusWaiting, lastUpdated).Cols("id", "runs_on").And(jobCond).Asc("updated", "id").Limit(limit, page*limit).Find(&jobs); err != nil {
|
||||
if err := e.Where("task_id=? AND status=? AND updated>=?", 0, StatusWaiting, lastUpdated).Cols("id", "runs_on").And(jobCond).Asc("updated", "id").Limit(limit).Find(&jobs); err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user