Add quotes in duration query

This commit is contained in:
Jan Eitzinger 2024-09-05 12:38:39 +02:00
parent 53ca38ce53
commit 5e65e21f0b

View File

@ -486,7 +486,7 @@ func (r *JobRepository) FindRunningJobs(cluster string) ([]*schema.Job, error) {
func (r *JobRepository) UpdateDuration() error {
stmnt := sq.Update("job").
Set("duration", sq.Expr("? - job.start_time", time.Now().Unix())).
Where("job_state = running")
Where("job_state = 'running'")
sql, _, err := stmnt.ToSql()
log.Infof("Duration Update query %s", sql)