QFIX: Show warning of not visited workspace only once (#8641)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-04-21 09:54:39 +05:00
committed by GitHub
parent ad9d8ae0e6
commit c41ee6383e
+6 -1
View File
@@ -798,6 +798,8 @@ export class PlatformWorker {
return this.integrations.map((it) => it.workspace)
}
checkedWorkspaces = new Set<string>()
async checkWorkspaceIsActive (
token: string,
workspace: WorkspaceUuid
@@ -825,7 +827,10 @@ export class PlatformWorker {
const lastVisit = (Date.now() - (workspaceInfo.lastVisit ?? 0)) / (3600 * 24 * 1000) // In days
if (config.WorkspaceInactivityInterval > 0 && lastVisit > config.WorkspaceInactivityInterval) {
this.ctx.warn('Workspace is inactive for too long, skipping for now.', { workspace })
if (!this.checkedWorkspaces.has(workspace)) {
this.checkedWorkspaces.add(workspace)
this.ctx.warn('Workspace is inactive for too long, skipping for now.', { workspace })
}
return { workspaceInfo: undefined, needRecheck: true }
}
return { workspaceInfo, needRecheck: true }