bit more logging, reset on timer reset
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
stryan 2022-08-21 16:43:52 -04:00
parent 5ad3582a85
commit 2059932ad9
2 changed files with 2 additions and 1 deletions

View File

@ -51,7 +51,6 @@ func main() {
}
var nun *nunWatch
uid := id.NewUserID(strings.ToLower(conf.Username), strings.ToLower(conf.Domain))
log.Println(uid)
store.SaveFilterID(uid, fID.FilterID)
matrixClient.Store = store
syncer := matrixClient.Syncer.(*mautrix.DefaultSyncer)

2
nun.go
View File

@ -22,6 +22,7 @@ func newNunWatch(stop chan bool, c *mautrix.Client, t int) *nunWatch {
func (n *nunWatch) SetTimer(t int) {
n.timer = t
n.fail = 0
}
func (n *nunWatch) Main() {
@ -53,6 +54,7 @@ func (n *nunWatch) Main() {
ticker.Reset(60 * time.Second)
}
if curT != n.timer {
log.Println("updating nunwatch timer")
ticker.Reset(time.Duration(n.timer) * time.Minute)
curT = n.timer
}