mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-01 11:13:50 +02:00
Enclose terms by spaces in app detection
This commit is contained in:
parent
dca25cc601
commit
8378784231
@ -111,7 +111,7 @@ func (t *AppTagger) Match(job *schema.Job) {
|
|||||||
for _, a := range t.apps {
|
for _, a := range t.apps {
|
||||||
tag := a.tag
|
tag := a.tag
|
||||||
for _, s := range a.strings {
|
for _, s := range a.strings {
|
||||||
if strings.Contains(strings.ToLower(jobscript), s) {
|
if strings.Contains(strings.ToLower(jobscript), fmt.Sprintf(" %s ", s)) {
|
||||||
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)
|
||||||
break out
|
break out
|
||||||
|
Loading…
x
Reference in New Issue
Block a user