1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

make interval configurable

This commit is contained in:
TimothyYe
2019-04-21 17:18:05 +08:00
parent 50c69bf548
commit 04134b20a4
7 changed files with 19 additions and 14 deletions

View File

@@ -119,9 +119,9 @@ func (handler *Handler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.
log.Println("Failed to find zone for domain:", domain.DomainName)
}
}
// Interval is 5 minutes
log.Printf("Going to sleep, will start next checking in %d minutes...\r\n", godns.INTERVAL)
time.Sleep(time.Minute * godns.INTERVAL)
// Sleep with interval
log.Printf("Going to sleep, will start next checking in %d seconds...\r\n", handler.Configuration.Interval)
time.Sleep(time.Second * time.Duration(handler.Configuration.Interval))
}
}