feat(tracker): allow instrument have no thread, but warn about it

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2025-11-02 16:42:30 +02:00
parent 05b64dadc8
commit dafd45fd81
2 changed files with 24 additions and 1 deletions

View File

@ -83,6 +83,15 @@ func (m *Alerts) AddNamed(name, message string, priority AlertPriority) {
})
}
func (m *Alerts) ClearNamed(name string) {
for i := range m.alerts {
if n := m.alerts[i].Name; n != "" && n == name {
m.alerts[i].Duration = 0
return
}
}
}
func (m *Alerts) AddAlert(a Alert) {
for i := range m.alerts {
if n := m.alerts[i].Name; n != "" && n == a.Name {