Cleanup and handle error in AppTagger

This commit is contained in:
2026-02-19 08:24:39 +01:00
parent 745c0357f3
commit 90b52f997d
2 changed files with 3 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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
}