feat: add batch update support (close #414)

This commit is contained in:
JustSong
2023-09-03 14:58:20 +08:00
parent 8e0a744da3
commit cf0ae05d50
7 changed files with 136 additions and 1 deletions
+5
View File
@@ -77,6 +77,11 @@ func main() {
}
go controller.AutomaticallyTestChannels(frequency)
}
if os.Getenv("BATCH_UPDATE_ENABLED") == "true" {
common.BatchUpdateEnabled = true
common.SysLog("batch update enabled with interval " + strconv.Itoa(common.BatchUpdateInterval) + "s")
model.InitBatchUpdater()
}
controller.InitTokenEncoders()
// Initialize HTTP server