feat: publish sanitized custom.97 source

This commit is contained in:
cneicy committed 2026-10-27 20:43:39 +08:00
1 parent 8e6ed0317b
commit 86c0276156
1022 files changed
+69903 -19207

No files matched your search

+7 -7
View File
@@ -108,13 +108,13 @@ func InitChannelCache() {
// invalidating the pricing cache, otherwise the reversed order deadlocks.
InvalidatePricingCache()
rebuildTaskAliasView()
common.SysLog("channels synced from database")
common.SysLog(common.LogText("channels synced from database"))
}
func SyncChannelCache(frequency int) {
for {
time.Sleep(time.Duration(frequency) * time.Second)
common.SysLog("syncing channels from database")
common.SysLog(common.LogText("syncing channels from database"))
InitChannelCache()
}
}
@@ -159,7 +159,7 @@ func GetRandomSatisfiedChannel(
if channel, ok := channelsIDM[channels[0]]; ok {
return channel, nil
}
return nil, fmt.Errorf("数据库一致性错误,渠道# %d 不存在,请联系管理员修复", channels[0])
return nil, fmt.Errorf("database consistency error: channel #%d does not exist, please contact the administrator", channels[0])
}
uniquePriorities := make(map[int]bool)
@@ -167,7 +167,7 @@ func GetRandomSatisfiedChannel(
if channel, ok := channelsIDM[channelId]; ok {
uniquePriorities[int(channel.GetPriority())] = true
} else {
return nil, fmt.Errorf("数据库一致性错误,渠道# %d 不存在,请联系管理员修复", channelId)
return nil, fmt.Errorf("database consistency error: channel #%d does not exist, please contact the administrator", channelId)
}
}
var sortedUniquePriorities []int
@@ -191,7 +191,7 @@ func GetRandomSatisfiedChannel(
targetChannels = append(targetChannels, channel)
}
} else {
return nil, fmt.Errorf("数据库一致性错误,渠道# %d 不存在,请联系管理员修复", channelId)
return nil, fmt.Errorf("database consistency error: channel #%d does not exist, please contact the administrator", channelId)
}
}
@@ -239,7 +239,7 @@ func CacheGetChannel(id int) (*Channel, error) {
c, ok := channelsIDM[id]
if !ok {
return nil, fmt.Errorf("渠道# %d,已不存在", id)
return nil, fmt.Errorf("channel #%d no longer exists", id)
}
return c, nil
}
@@ -257,7 +257,7 @@ func CacheGetChannelInfo(id int) (*ChannelInfo, error) {
c, ok := channelsIDM[id]
if !ok {
return nil, fmt.Errorf("渠道# %d,已不存在", id)
return nil, fmt.Errorf("channel #%d no longer exists", id)
}
return &c.ChannelInfo, nil
}