mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-06-08 08:33:49 +02:00
Add hint message only if rule matches
This commit is contained in:
parent
8d6ae85b0d
commit
0261c263f9
@ -277,9 +277,6 @@ func (t *JobClassTagger) Match(job *schema.Job) {
|
|||||||
if !r.HasTag(id, t.tagType, tag) {
|
if !r.HasTag(id, t.tagType, tag) {
|
||||||
r.AddTagOrCreateDirect(id, t.tagType, tag)
|
r.AddTagOrCreateDirect(id, t.tagType, tag)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
log.Info("Rule does not match!")
|
|
||||||
}
|
|
||||||
|
|
||||||
// process hint template
|
// process hint template
|
||||||
var msg bytes.Buffer
|
var msg bytes.Buffer
|
||||||
@ -290,5 +287,8 @@ func (t *JobClassTagger) Match(job *schema.Job) {
|
|||||||
|
|
||||||
// FIXME: Handle case where multiple tags apply
|
// FIXME: Handle case where multiple tags apply
|
||||||
r.UpdateMetadata(job, "message", msg.String())
|
r.UpdateMetadata(job, "message", msg.String())
|
||||||
|
} else {
|
||||||
|
log.Info("Rule does not match!")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user