clarify errors
This commit is contained in:
parent
29ff95e43e
commit
9c68067fc3
8
nun.go
8
nun.go
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user