mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-09 11:52:35 +03:00
fix: logging of scanner startup
This commit is contained in:
parent
dee68559ab
commit
e23a290812
@ -66,16 +66,15 @@ func (a *Server) initRoutes() {
|
|||||||
|
|
||||||
func (a *Server) initScanner() {
|
func (a *Server) initScanner() {
|
||||||
interval, err := time.ParseDuration(conf.Server.ScanInterval)
|
interval, err := time.ParseDuration(conf.Server.ScanInterval)
|
||||||
if interval == 0 {
|
|
||||||
log.Info("Scanner is disabled", "interval", conf.Server.ScanInterval, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Invalid interval specification. Using default of 5m", "interval", conf.Server.ScanInterval, err)
|
log.Error("Invalid interval specification. Using default of 5m", "interval", conf.Server.ScanInterval, err)
|
||||||
interval = 5 * time.Minute
|
interval = 5 * time.Minute
|
||||||
} else {
|
|
||||||
log.Info("Starting scanner", "interval", interval.String())
|
|
||||||
}
|
}
|
||||||
|
if interval == 0 {
|
||||||
|
log.Warn("Scanner is disabled", "interval", conf.Server.ScanInterval)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
log.Info("Starting scanner", "interval", interval.String())
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(2 * time.Second)
|
time.Sleep(2 * time.Second)
|
||||||
for {
|
for {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user