Simplify code found by simplicity audit of d6be98f

This commit is contained in:
Ian Gulliver
2026-10-23 13:05:14 -07:00
parent c337799147
commit 3c2932c8fb
26 changed files with 180 additions and 225 deletions
+1 -5
View File
@@ -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 {