MCPcopy
hub / github.com/songquanpeng/one-api / InitBatchUpdater

Function InitBatchUpdater

model/utils.go:29–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func InitBatchUpdater() {
30 go func() {
31 for {
32 time.Sleep(time.Duration(config.BatchUpdateInterval) * time.Second)
33 batchUpdate()
34 }
35 }()
36}
37
38func addNewRecord(type_ int, id int, value int64) {
39 batchUpdateLocks[type_].Lock()

Callers 1

mainFunction · 0.92

Calls 1

batchUpdateFunction · 0.85

Tested by

no test coverage detected