Skip to content

Commit adfe3dd

Browse files
committed
chore: debug
1 parent 08f8df1 commit adfe3dd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

api/src/dump.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ export const dump = async (dumpKey: string, _name?: string) => {
6363
}
6464
cmd += ` --uri ${mongoUrl.href}`
6565
await exec(config.mongo.cmdTmpl.replace('CMD', cmd))
66+
debug('dump finished, split archive')
6667
await splitArchive({ tmpPath, name: `mongo-${db}.gz` }, name)
68+
debug('cleanup tmp file')
6769
await tmpFile.cleanup()
6870
}
6971
await client.close()
@@ -73,7 +75,9 @@ export const dump = async (dumpKey: string, _name?: string) => {
7375
const tmpDir = await tmp.dir({ unsafeCleanup: true, dir: config.tmpdir })
7476
const tmpPath = `${tmpDir.path}/archive.zip`
7577
await exec(`zip ${tmpPath} -q -r -- *`, { cwd: dirPath })
78+
debug('zip finished, split archive')
7679
await splitArchive({ tmpPath, name: `${archiveName}.zip` }, name)
80+
debug('cleanup tmp file')
7781
await tmpDir.cleanup()
7882
} else {
7983
throw new Error(`Unknown dump key "${dumpKey}"`)

0 commit comments

Comments
 (0)