fix(core): update
This commit is contained in:
12
ts/index.ts
12
ts/index.ts
@@ -38,6 +38,16 @@ export class SmartMongo {
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
await this.mongoReplicaSet.stop(true);
|
||||
await this.mongoReplicaSet.stop();
|
||||
await this.mongoReplicaSet.cleanup();
|
||||
}
|
||||
|
||||
public async stopAndDumpToDir(dirArg: string) {
|
||||
const dumpDir = plugins.smartpath.transform.makeAbsolute(dirArg);
|
||||
const mongodumpInstance = new plugins.mongodump.MongoDump();
|
||||
const mongodumpTarget = await mongodumpInstance.addMongoTargetByMongoDescriptor(await this.getMongoDescriptor());
|
||||
await mongodumpTarget.dumpAllCollectionsToDir(dumpDir);
|
||||
await mongodumpInstance.stop();
|
||||
await this.stop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user