MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / LogQuotaData

Function LogQuotaData

model/usedata.go:63–70  ·  view source on GitHub ↗
(userId int, username string, modelName string, quota int, createdAt int64, tokenUsed int)

Source from the content-addressed store, hash-verified

61}
62
63func LogQuotaData(userId int, username string, modelName string, quota int, createdAt int64, tokenUsed int) {
64 // 只精确到小时
65 createdAt = createdAt - (createdAt % 3600)
66
67 CacheQuotaDataLock.Lock()
68 defer CacheQuotaDataLock.Unlock()
69 logQuotaDataCache(userId, username, modelName, quota, createdAt, tokenUsed)
70}
71
72func SaveQuotaDataCache() {
73 CacheQuotaDataLock.Lock()

Callers 1

RecordConsumeLogFunction · 0.85

Calls 1

logQuotaDataCacheFunction · 0.85

Tested by

no test coverage detected