mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-21 07:46:24 +00:00
Fix upgrade failed (#6432)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
1667581b5f
commit
d3ad61b842
@ -120,6 +120,8 @@ export class UpgradeWorker {
|
|||||||
ctx.error('error', { err })
|
ctx.error('error', { err })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Analytics.handleError(err)
|
||||||
|
|
||||||
ctx.info('---failed---------', {
|
ctx.info('---failed---------', {
|
||||||
pending: this.toProcess,
|
pending: this.toProcess,
|
||||||
time: Date.now() - t,
|
time: Date.now() - t,
|
||||||
|
@ -431,12 +431,17 @@ export async function upgradeModel (
|
|||||||
ctx.info('send force close', { workspace: workspaceId.name, transactorUrl })
|
ctx.info('send force close', { workspace: workspaceId.name, transactorUrl })
|
||||||
const serverEndpoint = transactorUrl.replaceAll('wss://', 'https://').replace('ws://', 'http://')
|
const serverEndpoint = transactorUrl.replaceAll('wss://', 'https://').replace('ws://', 'http://')
|
||||||
const token = generateToken(systemAccountEmail, workspaceId, { admin: 'true' })
|
const token = generateToken(systemAccountEmail, workspaceId, { admin: 'true' })
|
||||||
|
try {
|
||||||
await fetch(
|
await fetch(
|
||||||
serverEndpoint + `/api/v1/manage?token=${token}&operation=force-close&wsId=${toWorkspaceString(workspaceId)}`,
|
serverEndpoint +
|
||||||
|
`/api/v1/manage?token=${token}&operation=force-close&wsId=${toWorkspaceString(workspaceId)}`,
|
||||||
{
|
{
|
||||||
method: 'PUT'
|
method: 'PUT'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
} catch (err: any) {
|
||||||
|
// Ignore error if transactor is not yet ready
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
await connection?.sendForceClose()
|
await connection?.sendForceClose()
|
||||||
|
Loading…
Reference in New Issue
Block a user