mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-11 21:11:57 +00:00
uberf-8425: ws service app name
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com> Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
6498d90afd
commit
00100de955
@ -52,6 +52,7 @@ import {
|
||||
createPostgreeDestroyAdapter,
|
||||
createPostgresAdapter,
|
||||
createPostgresTxAdapter,
|
||||
setDBExtraOptions,
|
||||
shutdownPostgres
|
||||
} from '@hcengineering/postgres'
|
||||
import { doBackupWorkspace, doRestoreWorkspace } from '@hcengineering/server-backup'
|
||||
@ -107,6 +108,7 @@ export type WorkspaceOperation = 'create' | 'upgrade' | 'all' | 'all+backup'
|
||||
export class WorkspaceWorker {
|
||||
runningTasks: number = 0
|
||||
resolveBusy: (() => void) | null = null
|
||||
id = randomUUID().slice(-8)
|
||||
|
||||
constructor (
|
||||
readonly workspaceQueue: PlatformQueueProducer<QueueWorkspaceMessage>,
|
||||
@ -146,6 +148,7 @@ export class WorkspaceWorker {
|
||||
this.wakeup = this.defaultWakeup
|
||||
const token = generateToken(systemAccountUuid, undefined, { service: 'workspace' })
|
||||
|
||||
ctx.info(`Starting workspace service worker ${this.id} with limit ${this.limit}...`)
|
||||
ctx.info('Sending a handshake to the account service...')
|
||||
const accountClient = getAccountClient(this.accountsUrl, token)
|
||||
|
||||
@ -164,6 +167,8 @@ export class WorkspaceWorker {
|
||||
|
||||
ctx.info('Successfully connected to the account service')
|
||||
|
||||
setDBExtraOptions({ connection: { application_name: `workspace-${this.id}` } })
|
||||
|
||||
registerTxAdapterFactory('mongodb', createMongoTxAdapter)
|
||||
registerAdapterFactory('mongodb', createMongoAdapter)
|
||||
registerDestroyFactory('mongodb', createMongoDestroyAdapter)
|
||||
|
Loading…
Reference in New Issue
Block a user