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

+4 -5
View File
@@ -2,7 +2,6 @@ package model
import (
"errors"
"fmt"
"math"
"sync"
"time"
@@ -52,7 +51,7 @@ func addNewRecord(type_ int, id int, value int) {
sum := old + value
if (value > 0 && sum < old) || (value < 0 && sum > old) {
common.SysError(fmt.Sprintf("batch update overflow: type=%d id=%d old=%d value=%d", type_, id, old, value))
common.SysError(common.LogText("batch update overflow: type=%d id=%d old=%d value=%d", type_, id, old, value))
if value > 0 {
sum = math.MaxInt
} else {
@@ -79,7 +78,7 @@ func batchUpdate() {
return
}
common.SysLog("batch update started")
common.SysLog(common.LogText("batch update started"))
stores := make([]map[int]int, BatchUpdateTypeCount)
for i := range BatchUpdateTypeCount {
batchUpdateLocks[i].Lock()
@@ -97,7 +96,7 @@ func batchUpdate() {
case BatchUpdateTypeTokenQuota:
err := increaseTokenQuota(key, value)
if err != nil {
common.SysLog("failed to batch update token quota: " + err.Error())
common.SysLog(common.LogText("failed to batch update token quota: %s", err.Error()))
}
case BatchUpdateTypeChannelUsedQuota:
updateChannelUsedQuota(key, value)
@@ -122,7 +121,7 @@ func batchUpdate() {
for key := range userIDs {
updateUserQuotaUsedQuotaAndRequestCount(key, userQuotaStore[key], usedQuotaStore[key], requestCountStore[key])
}
common.SysLog("batch update finished")
common.SysLog(common.LogText("batch update finished"))
}
func RecordExist(err error) (bool, error) {