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

Function addNewRecord

model/utils.go:41–49  ·  view source on GitHub ↗
(type_ int, id int, value int)

Source from the content-addressed store, hash-verified

39}
40
41func addNewRecord(type_ int, id int, value int) {
42 batchUpdateLocks[type_].Lock()
43 defer batchUpdateLocks[type_].Unlock()
44 if _, ok := batchUpdateStores[type_][id]; !ok {
45 batchUpdateStores[type_][id] = value
46 } else {
47 batchUpdateStores[type_][id] += value
48 }
49}
50
51func batchUpdate() {
52 // check if there's any data to update

Callers 6

UpdateChannelUsedQuotaFunction · 0.85
IncreaseUserQuotaFunction · 0.85
DecreaseUserQuotaFunction · 0.85
IncreaseTokenQuotaFunction · 0.85
DecreaseTokenQuotaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected