mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
UBERF-7854: Fix live query $lookup update (#6304)
This commit is contained in:
@@ -1491,6 +1491,8 @@ export class GithubWorker implements IntegrationManager {
|
||||
reconnect(workspace.name, event)
|
||||
})
|
||||
|
||||
await GithubWorker.checkIntegrations(client, installations)
|
||||
|
||||
const worker = new GithubWorker(
|
||||
ctx,
|
||||
platformWorker,
|
||||
@@ -1510,6 +1512,17 @@ export class GithubWorker implements IntegrationManager {
|
||||
await client?.close()
|
||||
}
|
||||
}
|
||||
|
||||
static async checkIntegrations (client: Client, installations: Map<number, InstallationRecord>): Promise<void> {
|
||||
const wsIntegerations = await client.findAll(github.class.GithubIntegration, {})
|
||||
|
||||
for (const intValue of wsIntegerations) {
|
||||
if (!installations.has(intValue.installationId)) {
|
||||
const ops = new TxOperations(client, core.account.System)
|
||||
await ops.remove<GithubIntegration>(intValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function syncUser (
|
||||
|
||||
Reference in New Issue
Block a user