mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 21:23:44 +08:00
🐛 fix: Fixed the slave service unsynchronized data (#191)
This commit is contained in:
@@ -146,15 +146,15 @@ func UpdateAllChannelsBalance(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func AutomaticallyUpdateChannels(frequency int) {
|
||||
if frequency <= 0 {
|
||||
return
|
||||
}
|
||||
// func AutomaticallyUpdateChannels(frequency int) {
|
||||
// if frequency <= 0 {
|
||||
// return
|
||||
// }
|
||||
|
||||
for {
|
||||
time.Sleep(time.Duration(frequency) * time.Minute)
|
||||
common.SysLog("updating all channels")
|
||||
_ = updateAllChannelsBalance()
|
||||
common.SysLog("channels update done")
|
||||
}
|
||||
}
|
||||
// for {
|
||||
// time.Sleep(time.Duration(frequency) * time.Minute)
|
||||
// common.SysLog("updating all channels")
|
||||
// _ = updateAllChannelsBalance()
|
||||
// common.SysLog("channels update done")
|
||||
// }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user