(ctx context.Context)
| 298 | } |
| 299 | |
| 300 | func (s schedulerTaskSource) PendingRuns(ctx context.Context) ([]schedulerpkg.RunSnapshot, error) { |
| 301 | runs, err := s.store.ListTaskRunsByStatus(ctx, []taskpkg.RunStatus{taskpkg.TaskRunStatusQueued}) |
| 302 | if err != nil { |
| 303 | return nil, err |
| 304 | } |
| 305 | snapshots, err := s.joinRunsWithTasks(ctx, runs) |
| 306 | if err != nil { |
| 307 | return nil, err |
| 308 | } |
| 309 | return s.filterPausedRuns(ctx, snapshots) |
| 310 | } |
| 311 | |
| 312 | func (s schedulerTaskSource) ActiveRuns(ctx context.Context) ([]taskpkg.Run, error) { |
| 313 | return s.store.ListTaskRunsByStatus(ctx, []taskpkg.RunStatus{ |
nothing calls this directly
no test coverage detected