small logging changes

This commit is contained in:
Christoph Kluge 2024-11-22 15:08:53 +01:00
parent baa7367ebe
commit a8eff6fbd1

View File

@ -51,14 +51,14 @@ func RegisterFootprintWorker() {
repo, err := metricdata.GetMetricDataRepo(cluster.Name) repo, err := metricdata.GetMetricDataRepo(cluster.Name)
if err != nil { if err != nil {
log.Warnf("no metric data repository configured for '%s'", cluster.Name) log.Errorf("no metric data repository configured for '%s'", cluster.Name)
continue continue
} }
pendingStatements := []sq.UpdateBuilder{} pendingStatements := []sq.UpdateBuilder{}
for _, job := range jobs { for _, job := range jobs {
log.Debugf("Try job %d", job.JobID) log.Debugf("Prepare job %d", job.JobID)
cl++ cl++
s_job := time.Now() s_job := time.Now()
@ -116,7 +116,6 @@ func RegisterFootprintWorker() {
pendingStatements = append(pendingStatements, stmt) pendingStatements = append(pendingStatements, stmt)
log.Debugf("Job %d took %s", job.JobID, time.Since(s_job)) log.Debugf("Job %d took %s", job.JobID, time.Since(s_job))
} }
log.Debugf("Finish preparation for %d jobs: %d statements", len(jobs), len(pendingStatements))
t, err := jobRepo.TransactionInit() t, err := jobRepo.TransactionInit()
if err != nil { if err != nil {
@ -131,7 +130,7 @@ func RegisterFootprintWorker() {
ce++ ce++
} else { } else {
// Args: JSON, JSON, ENERGY, JOBID // Args: JSON, JSON, ENERGY, JOBID
log.Infof("add transaction on index %d", idx) log.Debugf("add transaction on index %d", idx)
jobRepo.TransactionAdd(t, query, args...) jobRepo.TransactionAdd(t, query, args...)
c++ c++
} }