mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added MongoDB bulk remove for added performance.
This commit is contained in:
parent
a12fba0d98
commit
394a2e2878
2 changed files with 37 additions and 3 deletions
|
@ -3587,7 +3587,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
|
|||
if (db.RemoveSMBIOS) { db.RemoveSMBIOS(node._id); } // Remove SMBios data
|
||||
db.RemoveAllNodeEvents(node._id); // Remove all events for this node
|
||||
db.removeAllPowerEventsForNode(node._id); // Remove all power events for this node
|
||||
db.Get('ra' + obj.dbNodeKey, function (err, nodes) {
|
||||
db.Get('ra' + node._id, function (err, nodes) {
|
||||
if ((nodes != null) && (nodes.length == 1)) { db.Remove('da' + nodes[0].daid); } // Remove diagnostic agent to real agent link
|
||||
db.Remove('ra' + node._id); // Remove real agent to diagnostic agent link
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue