UBERF-5350: Fix workspace name create issue (#4555)

This commit is contained in:
Andrey Sobolev 2024-02-07 11:48:44 +07:00 committed by GitHub
parent 6357efda60
commit 9b6c342656
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -639,7 +639,7 @@ async function generateWorkspaceRecord (
return { _id: id.insertedId, ...data }
}
const workspaceUrlPrefix = stripId(workspaceName)
const workspaceIdPrefix = stripId(getEmailName(email)).slice(0, 12) + '-' + workspaceUrlPrefix.slice(12)
const workspaceIdPrefix = stripId(getEmailName(email)).slice(0, 12) + '-' + workspaceUrlPrefix.slice(0, 12)
let iteration = 0
let idPostfix = generateId('-')
let urlPostfix = ''

View File

@ -47,8 +47,9 @@ export async function startCollaborator (): Promise<void> {
const shutdown = await start(metricsContext, config, minioClient, mongoClient)
const close = (): void => {
void mongoClient.close()
void shutdown()
void shutdown().then(() => {
void mongoClient.close()
})
}
process.on('uncaughtException', (e) => {