mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-01-05 20:05:02 -06:00
[release] v0.12.0-unstable44
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cosmos-server",
|
||||
"version": "0.12.0-unstable43",
|
||||
"version": "0.12.0-unstable44",
|
||||
"description": "",
|
||||
"main": "test-server.js",
|
||||
"bugs": {
|
||||
|
||||
@@ -143,10 +143,11 @@ func flushAllBuffers() {
|
||||
func BufferedDBWrite(collectionName string, object map[string]interface{}) {
|
||||
bufferLock.Lock()
|
||||
writeBuffer[collectionName] = append(writeBuffer[collectionName], object)
|
||||
bufferLock.Unlock()
|
||||
|
||||
if len(writeBuffer[collectionName]) >= bufferCapacity {
|
||||
flushBuffer(collectionName)
|
||||
}
|
||||
bufferLock.Unlock()
|
||||
}
|
||||
|
||||
func WriteToDatabase(collection *mongo.Collection, objects []map[string]interface{}) error {
|
||||
|
||||
Reference in New Issue
Block a user