mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
make interval configurable
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user