mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 18:01:59 +00:00
QFIX: Fix huge statistics send (#8482)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
14bdc38d75
commit
96d39ad728
@ -172,7 +172,7 @@ export function serveStats (ctx: MeasureContext, onClose?: () => void): void {
|
||||
const service = payload.extra?.service === 'true'
|
||||
const serviceName = (req.query.name as string) ?? ''
|
||||
if (service) {
|
||||
ctx.info('put stats', { service: req.query.name })
|
||||
ctx.info('put stats', { service: req.query.name, len: req.request.length })
|
||||
statistics.set(serviceName, {
|
||||
...(req.request.body as ServiceStatistics),
|
||||
lastUpdate: Date.now()
|
||||
|
@ -705,11 +705,7 @@ export async function backup (
|
||||
blobsSize: 0,
|
||||
backupSize: 0
|
||||
}
|
||||
ctx = ctx.newChild('backup', {
|
||||
workspaceId: workspaceId.name,
|
||||
force: options.force,
|
||||
timeout: options.timeout
|
||||
})
|
||||
ctx = ctx.newChild('backup', {})
|
||||
|
||||
let _canceled = false
|
||||
const canceled = (): boolean => {
|
||||
|
@ -265,7 +265,7 @@ class BackupWorker {
|
||||
rootCtx.warn('\n\nBACKUP WORKSPACE ', {
|
||||
workspace: ws.workspace
|
||||
})
|
||||
const ctx = rootCtx.newChild(ws.workspace, { workspace: ws.workspace })
|
||||
const ctx = rootCtx.newChild('doBackup', {})
|
||||
let pipeline: Pipeline | undefined
|
||||
try {
|
||||
const storage = await createStorageBackupStorage(
|
||||
@ -446,7 +446,7 @@ export async function doRestoreWorkspace (
|
||||
rootCtx.warn('\nRESTORE WORKSPACE ', {
|
||||
workspace: ws.workspace
|
||||
})
|
||||
const ctx = rootCtx.newChild(ws.workspace, { workspace: ws.workspace })
|
||||
const ctx = rootCtx.newChild('doRestoreWorkspace', {})
|
||||
let pipeline: Pipeline | undefined
|
||||
try {
|
||||
const storage = await createStorageBackupStorage(ctx, backupAdapter, getWorkspaceId(bucketName), ws.workspace)
|
||||
|
@ -177,8 +177,7 @@ export class WorkspaceWorker {
|
||||
void this.exec(async () => {
|
||||
await this.doWorkspaceOperation(
|
||||
ctx.newChild('workspaceOperation', {
|
||||
workspace: workspace.workspace,
|
||||
workspaceName: workspace.workspaceName
|
||||
mode: workspace.mode
|
||||
}),
|
||||
workspace,
|
||||
opt
|
||||
|
@ -39,7 +39,7 @@ export async function createWorkspace (
|
||||
) => Promise<void>,
|
||||
external: boolean = false
|
||||
): Promise<void> {
|
||||
const childLogger = ctx.newChild('createWorkspace', {}, { workspace: workspaceInfo.workspace })
|
||||
const childLogger = ctx.newChild('createWorkspace', {}, {})
|
||||
const ctxModellogger: ModelLogger = {
|
||||
log: (msg, data) => {
|
||||
childLogger.info(msg, data)
|
||||
|
@ -135,7 +135,7 @@ export class AIControl {
|
||||
token,
|
||||
workspace,
|
||||
this,
|
||||
this.ctx.newChild(workspace, {}),
|
||||
this.ctx.newChild('client', {}),
|
||||
info
|
||||
)
|
||||
}
|
||||
@ -146,7 +146,7 @@ export class AIControl {
|
||||
token,
|
||||
workspace,
|
||||
this,
|
||||
this.ctx.newChild(workspace, {}),
|
||||
this.ctx.newChild('client', {}),
|
||||
info
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user