qfix: backups using pipeline (#9396)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-07-01 22:51:20 +07:00
committed by GitHub
parent 4646d271c9
commit a23326fd6b
38 changed files with 2553 additions and 2793 deletions
+3 -15
View File
@@ -1,7 +1,5 @@
import { getWorkspaceById, getWorkspaceByUrl, type AccountDB, type Workspace } from '@hcengineering/account'
import {
systemAccountUuid,
type WorkspaceUuid,
type AttachedData,
type AttachedDoc,
type Class,
@@ -9,10 +7,9 @@ import {
type DocumentUpdate,
type Ref,
type Space,
type TxOperations
type TxOperations,
type WorkspaceUuid
} from '@hcengineering/core'
import { getTransactorEndpoint } from '@hcengineering/server-client'
import { generateToken } from '@hcengineering/server-token'
export async function findOrUpdateAttached<T extends AttachedDoc> (
client: TxOperations,
@@ -61,13 +58,4 @@ export async function getWorkspace (db: AccountDB, workspace: string): Promise<W
return wsObj
}
export function getToolToken (workspace?: WorkspaceUuid): string {
return generateToken(systemAccountUuid, workspace, { service: 'tool' })
}
export async function getWorkspaceTransactorEndpoint (
workspace: WorkspaceUuid,
type: 'external' | 'internal' = 'external'
): Promise<string> {
return await getTransactorEndpoint(getToolToken(workspace), type)
}
export { getToolToken, getWorkspaceTransactorEndpoint } from '@hcengineering/server-tool'