diff --git a/internal/api/rest.go b/internal/api/rest.go index 25f78b5..eed30b9 100644 --- a/internal/api/rest.go +++ b/internal/api/rest.go @@ -929,7 +929,7 @@ func (api *RestApi) stopJobByRequest(rw http.ResponseWriter, r *http.Request) { return } - log.Printf("loading db job from request for stopJobByRequest... : jobId=%d, cluster=%v, startTime=%d", req.JobId, req.Cluster, req.StartTime) + log.Printf("loading db job for stopJobByRequest... : stopJobApiRequest=%#v", req) job, err = api.JobRepository.Find(req.JobId, req.Cluster, req.StartTime) if err != nil { diff --git a/internal/repository/job.go b/internal/repository/job.go index b42598d..54ec6d0 100644 --- a/internal/repository/job.go +++ b/internal/repository/job.go @@ -235,6 +235,9 @@ 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) + log.Debugf("Timer Find %s", time.Since(start)) return scanJob(q.RunWith(r.stmtCache).QueryRow()) }