File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,6 +122,9 @@ export class AccountPermissionSyncer {
122122 data : accounts . map ( account => ( {
123123 accountId : account . id ,
124124 } ) ) ,
125+ include : {
126+ account : true ,
127+ }
125128 } ) ;
126129
127130 await this . queue . addBulk ( jobs . map ( ( job ) => ( {
@@ -132,6 +135,8 @@ export class AccountPermissionSyncer {
132135 opts : {
133136 removeOnComplete : env . REDIS_REMOVE_ON_COMPLETE ,
134137 removeOnFail : env . REDIS_REMOVE_ON_FAIL ,
138+ // Priority 1 (high) for never-synced, Priority 2 (normal) for re-sync
139+ priority : job . account . permissionSyncedAt === null ? 1 : 2 ,
135140 }
136141 } ) ) )
137142 }
Original file line number Diff line number Diff line change @@ -126,6 +126,9 @@ export class RepoPermissionSyncer {
126126 data : repos . map ( repo => ( {
127127 repoId : repo . id ,
128128 } ) ) ,
129+ include : {
130+ repo : true ,
131+ }
129132 } ) ;
130133
131134 await this . queue . addBulk ( jobs . map ( ( job ) => ( {
@@ -136,6 +139,8 @@ export class RepoPermissionSyncer {
136139 opts : {
137140 removeOnComplete : env . REDIS_REMOVE_ON_COMPLETE ,
138141 removeOnFail : env . REDIS_REMOVE_ON_FAIL ,
142+ // Priority 1 (high) for never-synced, Priority 2 (normal) for re-sync
143+ priority : job . repo . permissionSyncedAt === null ? 1 : 2 ,
139144 }
140145 } ) ) )
141146 }
You can’t perform that action at this time.
0 commit comments