diff --git a/internal/repository/job.go b/internal/repository/job.go index 566a13b1..3b237bce 100644 --- a/internal/repository/job.go +++ b/internal/repository/job.go @@ -1066,7 +1066,7 @@ func (r *JobRepository) GetUsedNodes(ts int64) (map[string][]string, error) { // Note: Query expects index on (job_state, start_time) for optimal performance q := sq.Select("job.cluster", "job.resources").From("job"). Where("job.start_time < ?", ts). - Where(sq.Eq{"job.job_state": "running"}) + Where("job.job_state = 'running'") rows, err := q.RunWith(r.stmtCache).Query() if err != nil { diff --git a/internal/repository/stats.go b/internal/repository/stats.go index 6d29a5e5..18f3e120 100644 --- a/internal/repository/stats.go +++ b/internal/repository/stats.go @@ -113,7 +113,7 @@ func (r *JobRepository) buildCountQuery( switch kind { case "running": - query = query.Where("job.job_state = ?", "running") + query = query.Where("job.job_state = 'running'") case "short": query = query.Where("job.duration < ?", config.Keys.ShortRunningJobsDuration) }