mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-26 05:19:05 +01:00
Add quotes in duration query
This commit is contained in:
parent
53ca38ce53
commit
5e65e21f0b
@ -486,7 +486,7 @@ func (r *JobRepository) FindRunningJobs(cluster string) ([]*schema.Job, error) {
|
|||||||
func (r *JobRepository) UpdateDuration() error {
|
func (r *JobRepository) UpdateDuration() error {
|
||||||
stmnt := sq.Update("job").
|
stmnt := sq.Update("job").
|
||||||
Set("duration", sq.Expr("? - job.start_time", time.Now().Unix())).
|
Set("duration", sq.Expr("? - job.start_time", time.Now().Unix())).
|
||||||
Where("job_state = running")
|
Where("job_state = 'running'")
|
||||||
sql, _, err := stmnt.ToSql()
|
sql, _, err := stmnt.ToSql()
|
||||||
log.Infof("Duration Update query %s", sql)
|
log.Infof("Duration Update query %s", sql)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user