From 90b52f997d0749d3c06cceda0cd3bf7916f50088 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Thu, 19 Feb 2026 08:24:39 +0100 Subject: [PATCH] Cleanup and handle error in AppTagger --- cmd/cc-backend/main.go | 2 -- internal/tagger/detectApp.go | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/cc-backend/main.go b/cmd/cc-backend/main.go index 3ee05383..fde95fd3 100644 --- a/cmd/cc-backend/main.go +++ b/cmd/cc-backend/main.go @@ -279,8 +279,6 @@ func initSubsystems() error { return fmt.Errorf("initializing archive: %w", err) } - // Note: metricstore.Init() is called later in runServer() with proper configuration - // Handle database re-initialization if flagReinitDB { if err := importer.InitDB(); err != nil { diff --git a/internal/tagger/detectApp.go b/internal/tagger/detectApp.go index bd5faed8..21667a27 100644 --- a/internal/tagger/detectApp.go +++ b/internal/tagger/detectApp.go @@ -174,7 +174,9 @@ func (t *AppTagger) Match(job *schema.Job) { for _, re := range a.patterns { if re.MatchString(jobscriptLower) { if !r.HasTag(id, t.tagType, a.tag) { - r.AddTagOrCreateDirect(id, t.tagType, a.tag) + if _, err := r.AddTagOrCreateDirect(id, t.tagType, a.tag); err != nil { + cclog.Errorf("AppTagger: failed to add tag '%s' to job %d: %v", a.tag, id, err) + } } break out }