aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/manager/manager.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/manager/manager.go b/internal/manager/manager.go
index dcb1a37..f8b05fd 100644
--- a/internal/manager/manager.go
+++ b/internal/manager/manager.go
@@ -82,6 +82,9 @@ func (mgr *Manager) Run(ctx context.Context) error {
metadataTicker := time.NewTicker(mgr.MetadataRefreshInterval)
defer metadataTicker.Stop()
+ alertTicker := time.NewTicker(mgr.AlertDelay)
+ defer alertTicker.Stop()
+
shutdown := false
for {
select {
@@ -89,6 +92,10 @@ func (mgr *Manager) Run(ctx context.Context) error {
if err := mgr.metadataJob(ctx); err != nil {
return fmt.Errorf("unable to run metadata job: %v", err)
}
+ case <-alertTicker.C:
+ if err := mgr.alertJob(); err != nil {
+ return fmt.Errorf("unable to run alert job: %v\n", err)
+ }
case ev := <-mgr.meventCh:
if err := mgr.monitorJob(ev); err != nil {
return fmt.Errorf("unable to run monitor job: %v", err)