fix(core): update
This commit is contained in:
10
ts/index.ts
10
ts/index.ts
@@ -55,9 +55,15 @@ export class SmartMongo {
|
||||
* like stop() but allows you to actually store
|
||||
* the database on disk
|
||||
*/
|
||||
public async stopAndDumpToDir(dirArg: string, nameFunctionArg?: (doc: any) => string, emptyDirArg = true) {
|
||||
public async stopAndDumpToDir(
|
||||
dirArg: string,
|
||||
nameFunctionArg?: (doc: any) => string,
|
||||
emptyDirArg = true
|
||||
) {
|
||||
const mongodumpInstance = new plugins.mongodump.MongoDump();
|
||||
const mongodumpTarget = await mongodumpInstance.addMongoTargetByMongoDescriptor(await this.getMongoDescriptor());
|
||||
const mongodumpTarget = await mongodumpInstance.addMongoTargetByMongoDescriptor(
|
||||
await this.getMongoDescriptor()
|
||||
);
|
||||
await mongodumpTarget.dumpAllCollectionsToDir(dirArg, nameFunctionArg, emptyDirArg);
|
||||
await mongodumpInstance.stop();
|
||||
await this.stop();
|
||||
|
||||
Reference in New Issue
Block a user