mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 04:51:39 +02:00
change logging key, add args, add orderby id job.Find()
This commit is contained in:
@@ -235,8 +235,10 @@ func (r *JobRepository) Find(
|
||||
q = q.Where("job.start_time = ?", *startTime)
|
||||
}
|
||||
|
||||
s, _, _ := q.ToSql()
|
||||
log.Printf("trying to find db job with query: %s", s)
|
||||
q = q.OrderBy("job.id DESC") // always use newest matching job by db id
|
||||
|
||||
s, args, _ := q.ToSql()
|
||||
log.Printf("trying to find db job with query: %s | %v", s, args)
|
||||
|
||||
log.Debugf("Timer Find %s", time.Since(start))
|
||||
return scanJob(q.RunWith(r.stmtCache).QueryRow())
|
||||
|
Reference in New Issue
Block a user