graphicek/server/app/alerts.go

15 lines
190 B
Go

package app
import "time"
func (s *Server) StartAlerts() {
ticker := time.NewTicker(time.Second * 10)
go func() {
for {
s.Services.Alerts.EvaluateAlerts()
<-ticker.C
}
}()
}