mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-08 18:57:42 +02:00
QFIX: Show warning of not visited workspace only once (#8641)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user