mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Fixed MongoDB bulk write of events and power events.
This commit is contained in:
parent
31e8c12bca
commit
88ae5a30b4
2 changed files with 8 additions and 3 deletions
4
db.js
4
db.js
|
@ -1901,7 +1901,7 @@ module.exports.CreateDB = function (parent, func) {
|
|||
// Perform pending operations
|
||||
obj.dbCounters.eventsSetBulk++;
|
||||
var ops = [];
|
||||
for (var i in obj.eventsFilePendingSets) { ops.push({ document: obj.eventsFilePendingSets[i] }); }
|
||||
for (var i in obj.eventsFilePendingSets) { ops.push({ insertOne: { document: obj.eventsFilePendingSets[i] } }); }
|
||||
obj.eventsFilePendingCbs = obj.eventsFilePendingCb;
|
||||
obj.eventsFilePendingCb = null;
|
||||
obj.eventsFilePendingSets = null;
|
||||
|
@ -1920,7 +1920,7 @@ module.exports.CreateDB = function (parent, func) {
|
|||
// Perform pending operations
|
||||
obj.dbCounters.powerSetBulk++;
|
||||
var ops = [];
|
||||
for (var i in obj.powerFilePendingSets) { ops.push({ document: obj.powerFilePendingSets[i] }); }
|
||||
for (var i in obj.powerFilePendingSets) { ops.push({ insertOne: { document: obj.powerFilePendingSets[i] } }); }
|
||||
obj.powerFilePendingCbs = obj.powerFilePendingCb;
|
||||
obj.powerFilePendingCb = null;
|
||||
obj.powerFilePendingSets = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue