mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-13 02:41:11 +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 service = payload.extra?.service === 'true'
|
||||||
const serviceName = (req.query.name as string) ?? ''
|
const serviceName = (req.query.name as string) ?? ''
|
||||||
if (service) {
|
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, {
|
statistics.set(serviceName, {
|
||||||
...(req.request.body as ServiceStatistics),
|
...(req.request.body as ServiceStatistics),
|
||||||
lastUpdate: Date.now()
|
lastUpdate: Date.now()
|
||||||
|
@ -701,11 +701,7 @@ export async function backup (
|
|||||||
backupSize: 0
|
backupSize: 0
|
||||||
}
|
}
|
||||||
const workspaceId = wsIds.uuid
|
const workspaceId = wsIds.uuid
|
||||||
ctx = ctx.newChild('backup', {
|
ctx = ctx.newChild('backup', {})
|
||||||
workspaceId,
|
|
||||||
force: options.force,
|
|
||||||
timeout: options.timeout
|
|
||||||
})
|
|
||||||
|
|
||||||
let _canceled = false
|
let _canceled = false
|
||||||
const canceled = (): boolean => {
|
const canceled = (): boolean => {
|
||||||
|
@ -189,7 +189,9 @@ export class WorkspaceWorker {
|
|||||||
} else {
|
} else {
|
||||||
void this.exec(async () => {
|
void this.exec(async () => {
|
||||||
await ctx
|
await ctx
|
||||||
.with('workspaceOperation', {}, (ctx) => this.doWorkspaceOperation(ctx, workspace, opt))
|
.with('workspaceOperation', { mode: workspace.mode }, (ctx) =>
|
||||||
|
this.doWorkspaceOperation(ctx, workspace, opt)
|
||||||
|
)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
Analytics.handleError(err)
|
Analytics.handleError(err)
|
||||||
ctx.error('error', { err })
|
ctx.error('error', { err })
|
||||||
|
@ -152,7 +152,7 @@ export class AIControl {
|
|||||||
wsIds,
|
wsIds,
|
||||||
this.personUuid,
|
this.personUuid,
|
||||||
this.socialIds,
|
this.socialIds,
|
||||||
this.ctx.newChild(workspace, {}),
|
this.ctx.newChild('create-workspace', {}),
|
||||||
this.openai,
|
this.openai,
|
||||||
this.openaiEncoding,
|
this.openaiEncoding,
|
||||||
info
|
info
|
||||||
|
Loading…
Reference in New Issue
Block a user