chore: update geo unneeded reload whole config

This commit is contained in:
wwqgtxx
2024-08-16 09:19:18 +08:00
parent 92ec5f2236
commit 4fedfc47b0
11 changed files with 447 additions and 254 deletions

12
main.go
View File

@@ -120,17 +120,7 @@ func main() {
}
if C.GeoAutoUpdate {
updater.RegisterGeoUpdater(func() {
cfg, err := executor.ParseWithPath(C.Path.Config())
if err != nil {
log.Errorln("[GEO] update GEO databases failed: %v", err)
return
}
log.Warnln("[GEO] update GEO databases success, applying config")
executor.ApplyConfig(cfg, false)
})
updater.RegisterGeoUpdater()
}
defer executor.Shutdown()