fix(mongodb): modernize MongoDB dump handling and filesystem integration
This commit is contained in:
@@ -3,7 +3,7 @@ import { MongoDumpTarget } from './mongodump.classes.mongodumptarget.js';
|
||||
|
||||
export class MongoDump {
|
||||
public mongoTargetObjectMap = new plugins.lik.ObjectMap<MongoDumpTarget>();
|
||||
|
||||
|
||||
constructor() {}
|
||||
|
||||
public async addMongoTargetByMongoDescriptor(
|
||||
@@ -15,8 +15,8 @@ export class MongoDump {
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
await this.mongoTargetObjectMap.forEach(async (mongoTargetArg) => {
|
||||
await mongoTargetArg.mongoDbClient.close();
|
||||
})
|
||||
await Promise.all(
|
||||
this.mongoTargetObjectMap.getArray().map((mongoTargetArg) => mongoTargetArg.mongoDbClient.close())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user