This commit is contained in:
A. Feldmann
2018-03-14 09:48:49 +01:00
committed by Alexander Trost
parent 3c343fb0a2
commit 33bb722e06
5 changed files with 43 additions and 0 deletions

View File

@@ -118,6 +118,16 @@ func (mon *AbstractMonitor) ClockStart(cfg *CachetMonitor, iface MonitorInterfac
mon.tick(iface)
}
if cfg.Restarted {
initialIncident, err := mon.Get(cfg)
if err != nil {
logrus.Warn("could not fetch initial incident: %v", err)
}
if initialIncident != nil {
mon.incident = initialIncident
}
}
ticker := time.NewTicker(mon.Interval * time.Second)
for {
select {