Skip to content

Commit e9b5773

Browse files
reduce polling interval
1 parent f1c8025 commit e9b5773

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/backend/src/ee/accountPermissionSyncer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const logger = createLogger(LOG_TAG);
2222
const createJobLogger = (jobId: string) => createLogger(`${LOG_TAG}:job:${jobId}`);
2323

2424
const QUEUE_NAME = 'accountPermissionSyncQueue';
25+
const POLLING_INTERVAL_MS = 1000;
2526

2627
type AccountPermissionSyncJob = {
2728
jobId: string;
@@ -103,7 +104,7 @@ export class AccountPermissionSyncer {
103104
});
104105

105106
await this.schedulePermissionSync(accounts);
106-
}, 1000 * 5);
107+
}, POLLING_INTERVAL_MS);
107108
}
108109

109110
public async dispose() {

packages/backend/src/ee/repoPermissionSyncer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ type RepoPermissionSyncJob = {
1515
}
1616

1717
const QUEUE_NAME = 'repoPermissionSyncQueue';
18-
18+
const POLLING_INTERVAL_MS = 1000;
1919
const LOG_TAG = 'repo-permission-syncer';
20+
2021
const logger = createLogger(LOG_TAG);
2122
const createJobLogger = (jobId: string) => createLogger(`${LOG_TAG}:job:${jobId}`);
2223

@@ -107,7 +108,7 @@ export class RepoPermissionSyncer {
107108
});
108109

109110
await this.schedulePermissionSync(repos);
110-
}, 1000 * 5);
111+
}, POLLING_INTERVAL_MS);
111112
}
112113

113114
public async dispose() {

0 commit comments

Comments
 (0)