Skip to content

Commit

Permalink
core/services/pipeline: use request context for deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Jun 3, 2024
1 parent 7e536c1 commit 2b8a6a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/services/pipeline/orm.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ func (o *orm) prune(tx sqlutil.DataSource, jobID int32) {
}

func (o *orm) execPrune(ctx context.Context, jobID int32) {
res, err := o.ds.ExecContext(o.ctx, `DELETE FROM pipeline_runs WHERE pruning_key = $1 AND state = $2 AND id NOT IN (
res, err := o.ds.ExecContext(ctx, `DELETE FROM pipeline_runs WHERE pruning_key = $1 AND state = $2 AND id NOT IN (
SELECT id FROM pipeline_runs
WHERE pruning_key = $1 AND state = $2
ORDER BY id DESC
Expand Down

0 comments on commit 2b8a6a1

Please sign in to comment.