完整更新:恢复所有自定义配置
✅ 已同步官方 v0.9.0-alpha.8 ✅ 已恢复 Footer 自定义页脚 ✅ 已恢复 Claude 穿透功能 ✅ 已恢复 Docker 自定义配置 (端口3099) ✅ 已恢复 Channel 计费逻辑增强 ✅ 已创建更新手册和部署脚本 关键配置: - docker-compose-custom.yml: 使用3099端口,连接现有mysql/redis - controller/channel-billing.go: 包含渠道状态报告功能 - temp/: 包含更新手册和自动化脚本 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -483,10 +483,24 @@ func UpdateAllChannelsBalance(c *gin.Context) {
|
||||
}
|
||||
|
||||
func AutomaticallyUpdateChannels(frequency int) {
|
||||
reportCounter := 0
|
||||
reportInterval := 60 / frequency
|
||||
if reportInterval <= 0 {
|
||||
reportInterval = 1
|
||||
}
|
||||
|
||||
for {
|
||||
time.Sleep(time.Duration(frequency) * time.Minute)
|
||||
common.SysLog("updating all channels")
|
||||
_ = updateAllChannelsBalance()
|
||||
common.SysLog("channels update done")
|
||||
|
||||
reportCounter++
|
||||
if reportCounter >= reportInterval {
|
||||
reportCounter = 0
|
||||
go func() {
|
||||
service.ReportChannelState()
|
||||
}()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user