diff --git a/internal/api/rest.go b/internal/api/rest.go index 78b28af..5f8e15c 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 for stopJobByRequest... : stopJobApiRequest=%v", req) + // 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 644d427..84b13a0 100644 --- a/internal/repository/job.go +++ b/internal/repository/job.go @@ -235,10 +235,10 @@ func (r *JobRepository) Find( q = q.Where("job.start_time = ?", *startTime) } - q = q.OrderBy("job.id DESC") // always use newest matching job by db id + q = q.OrderBy("job.id DESC") // always use newest matching job by db id if more than one match - s, args, _ := q.ToSql() - log.Printf("trying to find db job with query: %s | %v", s, args) + // 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()) diff --git a/internal/routerConfig/routes.go b/internal/routerConfig/routes.go index 9540cd3..e7dc924 100644 --- a/internal/routerConfig/routes.go +++ b/internal/routerConfig/routes.go @@ -51,21 +51,19 @@ func setupHomeRoute(i InfoType, r *http.Request) InfoType { jobRepo := repository.GetJobRepository() groupBy := model.AggregateCluster - log.Infof(">>> HELLO HOME ROUTE") - - startJobCount := time.Now() + // startJobCount := time.Now() stats, err := jobRepo.JobCountGrouped(r.Context(), nil, &groupBy) if err != nil { log.Warnf("failed to count jobs: %s", err.Error()) } - log.Infof("Timer HOME ROUTE startJobCount: %s", time.Since(startJobCount)) + // log.Infof("Timer HOME ROUTE startJobCount: %s", time.Since(startJobCount)) - startRunningJobCount := time.Now() + // startRunningJobCount := time.Now() stats, err = jobRepo.AddJobCountGrouped(r.Context(), nil, &groupBy, stats, "running") if err != nil { log.Warnf("failed to count running jobs: %s", err.Error()) } - log.Infof("Timer HOME ROUTE startRunningJobCount: %s", time.Since(startRunningJobCount)) + // log.Infof("Timer HOME ROUTE startRunningJobCount: %s", time.Since(startRunningJobCount)) i["clusters"] = stats @@ -78,8 +76,6 @@ func setupHomeRoute(i InfoType, r *http.Request) InfoType { } } - log.Infof("... BYE HOME ROUTE") - return i } @@ -262,8 +258,6 @@ func SetupRoutes(router *mux.Router, buildInfo web.Build) { for _, route := range routes { route := route router.HandleFunc(route.Route, func(rw http.ResponseWriter, r *http.Request) { - log.Info(">>> HELLO ROUTE HANDLER ...") - conf, err := userCfgRepo.GetUIConfig(repository.GetUserFromContext(r.Context())) if err != nil { http.Error(rw, err.Error(), http.StatusInternalServerError) @@ -294,7 +288,6 @@ func SetupRoutes(router *mux.Router, buildInfo web.Build) { if route.Filter { page.FilterPresets = buildFilterPresets(r.URL.Query()) } - log.Infof("... ROUTE HANDLED: %s for %v", page.Title, page.User) web.RenderTemplate(rw, route.Template, &page) })