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