Trial and Test MetricStore components

This commit is contained in:
Aditya Ujeniya
2025-09-08 22:54:13 +02:00
parent 62565b9ae2
commit af43901ca3
34 changed files with 394 additions and 219 deletions

View File

@@ -26,9 +26,9 @@ func RegisterCommitJobService() {
gocron.NewTask(
func() {
start := time.Now()
cclog.Printf("Jobcache sync started at %s", start.Format(time.RFC3339))
cclog.Printf("Jobcache sync started at %s\n", start.Format(time.RFC3339))
jobs, _ := jobRepo.SyncJobs()
repository.CallJobStartHooks(jobs)
cclog.Printf("Jobcache sync and job callbacks are done and took %s", time.Since(start))
cclog.Printf("Jobcache sync and job callbacks are done and took %s\n", time.Since(start))
}))
}

View File

@@ -7,7 +7,6 @@ package taskManager
import (
"bytes"
"encoding/json"
"fmt"
"time"
"github.com/ClusterCockpit/cc-backend/internal/auth"
@@ -66,10 +65,6 @@ func Start(cronCfg, archiveConfig json.RawMessage) {
RegisterStopJobsExceedTime()
}
fmt.Printf("Keys : %#v\n", Keys)
fmt.Printf("cronCfg : %#v\n", cronCfg)
fmt.Printf("archiveConfig : %#v\n", archiveConfig)
dec := json.NewDecoder(bytes.NewReader(cronCfg))
dec.DisallowUnknownFields()
if err := dec.Decode(&Keys); err != nil {

View File

@@ -25,8 +25,8 @@ func RegisterUpdateDurationWorker() {
gocron.NewTask(
func() {
start := time.Now()
cclog.Printf("Update duration started at %s", start.Format(time.RFC3339))
cclog.Printf("Update duration started at %s\n", start.Format(time.RFC3339))
jobRepo.UpdateDuration()
cclog.Printf("Update duration is done and took %s", time.Since(start))
cclog.Printf("Update duration is done and took %s\n", time.Since(start))
}))
}

View File

@@ -134,8 +134,8 @@ func RegisterFootprintWorker() {
}
jobRepo.TransactionEnd(t)
}
cclog.Debugf("Finish Cluster %s, took %s", cluster.Name, time.Since(s_cluster))
cclog.Debugf("Finish Cluster %s, took %s\n", cluster.Name, time.Since(s_cluster))
}
cclog.Printf("Updating %d (of %d; Skipped %d) Footprints is done and took %s", c, cl, ce, time.Since(s))
cclog.Printf("Updating %d (of %d; Skipped %d) Footprints is done and took %s\n", c, cl, ce, time.Since(s))
}))
}