mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
Option to disable image proxy checker
This commit is contained in:
@@ -108,6 +108,7 @@ var EnvList []*EnvVar = []*EnvVar{
|
||||
// **Required**: No
|
||||
//
|
||||
// The interval in minutes between proxy checks. Defaults to 480 minutes (8 hours) if not set.
|
||||
// You can disable this by setting the value to 0. Then, proxies will only be checked once at server initialization.
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,12 @@ func StartProxyChecker() {
|
||||
return
|
||||
default:
|
||||
checkProxies()
|
||||
time.Sleep(GlobalServerConfig.ProxyCheckInterval)
|
||||
if t := GlobalServerConfig.ProxyCheckInterval; t > 0 {
|
||||
time.Sleep(t)
|
||||
} else {
|
||||
log.Println("Proxy check interval set to 0, disabling auto-check from now on.")
|
||||
select {} // Sweet dreams!
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user