mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 04:07:43 +02:00
UBERF-10222: Fix Github reviews field update (#9013)
This commit is contained in:
@@ -1580,6 +1580,7 @@ export class GithubWorker implements IntegrationManager {
|
||||
{ error: { $ne: null }, url: null },
|
||||
{ limit: 50 }
|
||||
)
|
||||
|
||||
if (withError.length === 0) {
|
||||
break
|
||||
}
|
||||
@@ -1590,6 +1591,26 @@ export class GithubWorker implements IntegrationManager {
|
||||
await ops.commit()
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (this.closing) {
|
||||
break
|
||||
}
|
||||
const withError = await derivedClient.findAll<any>(
|
||||
github.class.DocSyncInfo,
|
||||
{ error: { $ne: null } },
|
||||
{ limit: 50 }
|
||||
)
|
||||
|
||||
if (withError.length === 0) {
|
||||
break
|
||||
}
|
||||
const ops = derivedClient.apply()
|
||||
for (const d of withError) {
|
||||
await ops.update(d, { error: null, needSync: '' })
|
||||
}
|
||||
await ops.commit()
|
||||
}
|
||||
|
||||
for (const { _class, mapper } of this.mappers) {
|
||||
if (this.closing) {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user