🐛 fix: Fixed the slave service unsynchronized data (#191)

This commit is contained in:
MartialBE
2024-05-18 13:27:13 +08:00
parent f26a7839c9
commit 6ab116c0eb
2 changed files with 28 additions and 12 deletions

View File

@@ -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")
// }
// }