mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-11 18:01:59 +00:00
QFIX: Fix huge statistics send (#8483)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
92889e2413
commit
9e2baac3d8
@ -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()
|
||||
|
@ -701,11 +701,7 @@ export async function backup (
|
||||
backupSize: 0
|
||||
}
|
||||
const workspaceId = wsIds.uuid
|
||||
ctx = ctx.newChild('backup', {
|
||||
workspaceId,
|
||||
force: options.force,
|
||||
timeout: options.timeout
|
||||
})
|
||||
ctx = ctx.newChild('backup', {})
|
||||
|
||||
let _canceled = false
|
||||
const canceled = (): boolean => {
|
||||
|
@ -189,7 +189,9 @@ export class WorkspaceWorker {
|
||||
} else {
|
||||
void this.exec(async () => {
|
||||
await ctx
|
||||
.with('workspaceOperation', {}, (ctx) => this.doWorkspaceOperation(ctx, workspace, opt))
|
||||
.with('workspaceOperation', { mode: workspace.mode }, (ctx) =>
|
||||
this.doWorkspaceOperation(ctx, workspace, opt)
|
||||
)
|
||||
.catch((err) => {
|
||||
Analytics.handleError(err)
|
||||
ctx.error('error', { err })
|
||||
|
@ -152,7 +152,7 @@ export class AIControl {
|
||||
wsIds,
|
||||
this.personUuid,
|
||||
this.socialIds,
|
||||
this.ctx.newChild(workspace, {}),
|
||||
this.ctx.newChild('create-workspace', {}),
|
||||
this.openai,
|
||||
this.openaiEncoding,
|
||||
info
|
||||
|
Loading…
Reference in New Issue
Block a user