UBERF-8469: Fix exit from github service (#6921)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-10-15 10:04:39 +05:00
committed by GitHub
parent 81e02eb8ca
commit a714be51e9
13 changed files with 89 additions and 9 deletions
@@ -376,6 +376,9 @@ export class ProjectsSyncManager implements DocSyncManager {
repositories: GithubIntegrationRepository[]
): Promise<void> {
for (const prj of projects) {
if (this.provider.isClosing()) {
break
}
// Wait global project sync
await integration.syncLock.get(prj._id)
@@ -449,6 +452,9 @@ export class ProjectsSyncManager implements DocSyncManager {
(it) => it.space === prj._id
)
for (const m of milestones) {
if (this.provider.isClosing()) {
break
}
try {
let { projectStructure, wasUpdates } = await this.ctx.withLog(
'update project structure',