fix: Prevent memory explosion in sqlite. And make db options configurable

Entire-Checkpoint: e368e6d8abf3
This commit is contained in:
2026-03-11 06:14:05 +01:00
parent 301e590580
commit 09fa239e8b
9 changed files with 135 additions and 18 deletions

View File

@@ -171,7 +171,7 @@ func (r *JobRepository) FindByID(ctx context.Context, jobID int64) (*schema.Job,
return nil, qerr
}
return scanJob(q.RunWith(r.stmtCache).QueryRow())
return scanJob(q.RunWith(r.stmtCache).QueryRowContext(ctx))
}
// FindByIDWithUser executes a SQL query to find a specific batch job.
@@ -217,7 +217,7 @@ func (r *JobRepository) FindByJobID(ctx context.Context, jobID int64, startTime
return nil, qerr
}
return scanJob(q.RunWith(r.stmtCache).QueryRow())
return scanJob(q.RunWith(r.stmtCache).QueryRowContext(ctx))
}
// IsJobOwner checks if the specified user owns the batch job identified by jobID,