Fix workspace upgrade in restore

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2022-01-26 17:29:22 +07:00
parent c95b493a33
commit b1dd2c515b
No known key found for this signature in database
GPG Key ID: BD80F68D68D8F7F2

View File

@ -114,6 +114,7 @@ export async function restoreWorkspace (
elasticUrl: string, elasticUrl: string,
transactorUrl: string transactorUrl: string
): Promise<void> { ): Promise<void> {
console.log('Restoring workspace', mongoUrl, dbName, fileName)
const client = new MongoClient(mongoUrl) const client = new MongoClient(mongoUrl)
try { try {
await client.connect() await client.connect()
@ -161,7 +162,7 @@ export async function restoreWorkspace (
} }
} }
await upgradeModel(dbName, transactorUrl) await upgradeModel(transactorUrl, dbName)
await rebuildElastic(mongoUrl, dbName, minio, elasticUrl) await rebuildElastic(mongoUrl, dbName, minio, elasticUrl)
} finally { } finally {