mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-26 06:12:23 +02:00
UBERF-7790: Fix connection timeout issue (#6301)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -739,6 +739,9 @@ export class PlatformWorker {
|
||||
}
|
||||
}
|
||||
}
|
||||
this.ctx.info('************************* Check workspaces done ************************* ', {
|
||||
workspaces: this.clients.size
|
||||
})
|
||||
return errors > 0
|
||||
}
|
||||
|
||||
|
||||
@@ -35,13 +35,6 @@ import core, {
|
||||
type Blob,
|
||||
type MigrationState
|
||||
} from '@hcengineering/core'
|
||||
import { LiveQuery } from '@hcengineering/query'
|
||||
import { StorageAdapter } from '@hcengineering/server-core'
|
||||
import { getPublicLinkUrl } from '@hcengineering/server-guest-resources'
|
||||
import task, { ProjectType, TaskType } from '@hcengineering/task'
|
||||
import { MarkupNode, jsonToMarkup, isMarkdownsEquals } from '@hcengineering/text'
|
||||
import tracker from '@hcengineering/tracker'
|
||||
import { User } from '@octokit/webhooks-types'
|
||||
import github, {
|
||||
DocSyncInfo,
|
||||
GithubAuthentication,
|
||||
@@ -53,6 +46,13 @@ import github, {
|
||||
GithubUserInfo,
|
||||
githubId
|
||||
} from '@hcengineering/github'
|
||||
import { LiveQuery } from '@hcengineering/query'
|
||||
import { StorageAdapter } from '@hcengineering/server-core'
|
||||
import { getPublicLinkUrl } from '@hcengineering/server-guest-resources'
|
||||
import task, { ProjectType, TaskType } from '@hcengineering/task'
|
||||
import { MarkupNode, isMarkdownsEquals, jsonToMarkup } from '@hcengineering/text'
|
||||
import tracker from '@hcengineering/tracker'
|
||||
import { User } from '@octokit/webhooks-types'
|
||||
import { App, Octokit } from 'octokit'
|
||||
import { createPlatformClient } from './client'
|
||||
import { createCollaboratorClient } from './collaborator'
|
||||
@@ -1487,7 +1487,7 @@ export class GithubWorker implements IntegrationManager {
|
||||
ctx.info('Connecting to', { workspace: workspace.workspaceUrl, workspaceId: workspace.workspaceName })
|
||||
let client: Client | undefined
|
||||
try {
|
||||
client = await createPlatformClient(workspace.name, workspace.productId, 10000, (event: ClientConnectEvent) => {
|
||||
client = await createPlatformClient(workspace.name, workspace.productId, 30000, (event: ClientConnectEvent) => {
|
||||
reconnect(workspace.name, event)
|
||||
})
|
||||
|
||||
@@ -1506,6 +1506,7 @@ export class GithubWorker implements IntegrationManager {
|
||||
return worker
|
||||
}
|
||||
} catch (err: any) {
|
||||
ctx.error('timeout during to connect', { workspace, error: err })
|
||||
await client?.close()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user