Simplify code found by simplicity audit of d6be98f
This commit is contained in:
@@ -260,15 +260,11 @@ func (s *Store) RunTasks(ctx context.Context, run string) ([]api.Task, error) {
|
||||
}
|
||||
|
||||
func (s *Store) RunEvents(ctx context.Context, run string) ([]api.Event, error) {
|
||||
rows, err := s.db.QueryContext(ctx, `
|
||||
return s.queryEvents(ctx, `
|
||||
SELECT `+eventColumns+` FROM events
|
||||
WHERE task_id IN (SELECT id FROM tasks WHERE parent_task_id = ?1 AND workflow_stage != '') AND kind IN ('task.workflow_stage', 'task.discarded')
|
||||
ORDER BY seq
|
||||
`, run)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return scanEvents(rows)
|
||||
}
|
||||
|
||||
func (s *Store) RecordStage(ctx context.Context, taskID, output, commit string) error {
|
||||
|
||||
Reference in New Issue
Block a user