roshub / vapor_master

high availability ros master
Apache License 2.0
17 stars 8 forks source link

use `deleteMany` for db cleaning #3

Open sevenbitbyte opened 5 years ago

sevenbitbyte commented 5 years ago

DB cleaning as currently implemented could result in high network activity during cleanup. Use mongo db delete command instead

Current implementation

https://mongoosejs.com/docs/api.html#model_Model.deleteMany

https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/