mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03: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 })
|
||||
}
|
||||
|
||||
Analytics.handleError(err)
|
||||
|
||||
ctx.info('---failed---------', {
|
||||
pending: this.toProcess,
|
||||
time: Date.now() - t,
|
||||
|
@ -431,12 +431,17 @@ export async function upgradeModel (
|
||||
ctx.info('send force close', { workspace: workspaceId.name, transactorUrl })
|
||||
const serverEndpoint = transactorUrl.replaceAll('wss://', 'https://').replace('ws://', 'http://')
|
||||
const token = generateToken(systemAccountEmail, workspaceId, { admin: 'true' })
|
||||
await fetch(
|
||||
serverEndpoint + `/api/v1/manage?token=${token}&operation=force-close&wsId=${toWorkspaceString(workspaceId)}`,
|
||||
{
|
||||
method: 'PUT'
|
||||
}
|
||||
)
|
||||
try {
|
||||
await fetch(
|
||||
serverEndpoint +
|
||||
`/api/v1/manage?token=${token}&operation=force-close&wsId=${toWorkspaceString(workspaceId)}`,
|
||||
{
|
||||
method: 'PUT'
|
||||
}
|
||||
)
|
||||
} catch (err: any) {
|
||||
// Ignore error if transactor is not yet ready
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
await connection?.sendForceClose()
|
||||
|
Loading…
Reference in New Issue
Block a user