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") log.Fatal("fail count too high; ending loop")
return return
} else if n.fail > 3 { } else if n.fail > 3 {
log.Println("over three failures, increasing tick time by 5x") log.Printf("over three failures, increasing tick time to %v minutes", 3*n.timer)
ticker.Reset(5 * time.Duration(n.timer) * time.Minute) ticker.Reset(3 * time.Duration(n.timer) * time.Minute)
break break
} else { } else {
log.Printf("fail count %v", n.fail)
break break
} }
} }
n.fail = 0 n.fail = 0
ticker.Reset(time.Duration(n.timer) * time.Second) ticker.Reset(time.Duration(n.timer) * time.Minute)
if curT != n.timer { if curT != n.timer {
log.Println("updating nunwatch timer") log.Println("updating nunwatch timer")
ticker.Reset(time.Duration(n.timer) * time.Minute) ticker.Reset(time.Duration(n.timer) * time.Minute)
n.fail = 0
curT = n.timer curT = n.timer
} }