Fix unlocked write and unnecessary condition
This commit is contained in:
parent
08948391df
commit
6f0d441e39
|
@ -291,7 +291,6 @@ func (ag *aggrGroup) insert(alert *types.Alert) {
|
|||
// Immediately trigger a flush if the wait duration for this
|
||||
// alert is already over.
|
||||
if !ag.hasSent && alert.StartsAt.Add(ag.opts.GroupWait).Before(time.Now()) {
|
||||
fmt.Println("early")
|
||||
ag.next.Reset(0)
|
||||
}
|
||||
}
|
||||
|
@ -332,8 +331,8 @@ func (ag *aggrGroup) flush(notify func(...*types.Alert) bool) {
|
|||
delete(ag.alerts, fp)
|
||||
}
|
||||
}
|
||||
|
||||
ag.hasSent = true
|
||||
ag.mtx.Unlock()
|
||||
}
|
||||
|
||||
ag.hasSent = true
|
||||
}
|
||||
|
|
|
@ -249,7 +249,7 @@ func (n *DedupingNotifier) Notify(ctx context.Context, alerts ...*types.Alert) e
|
|||
}
|
||||
}
|
||||
}
|
||||
} else if a.Resolved() && !sendResolved {
|
||||
} else if a.Resolved() {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div ng-controller="StatusCtrl">
|
||||
<h2>Status</h2>
|
||||
<h1>Status</h1>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in New Issue