clarify errors

This commit is contained in:
stryan 2022-11-21 18:21:01 -05:00
parent 29ff95e43e
commit 9c68067fc3

8
nun.go
View File

@ -43,18 +43,20 @@ func (n *nunWatch) Main() {
log.Fatal("fail count too high; ending loop")
return
} else if n.fail > 3 {
log.Println("over three failures, increasing tick time by 5x")
ticker.Reset(5 * time.Duration(n.timer) * time.Minute)
log.Printf("over three failures, increasing tick time to %v minutes", 3*n.timer)
ticker.Reset(3 * time.Duration(n.timer) * time.Minute)
break
} else {
log.Printf("fail count %v", n.fail)
break
}
}
n.fail = 0
ticker.Reset(time.Duration(n.timer) * time.Second)
ticker.Reset(time.Duration(n.timer) * time.Minute)
if curT != n.timer {
log.Println("updating nunwatch timer")
ticker.Reset(time.Duration(n.timer) * time.Minute)
n.fail = 0
curT = n.timer
}