File tree Expand file tree Collapse file tree
apps/backend/src/app/api/latest/internal/external-db-sync Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ export const GET = createSmartRouteHandler({
214214 await upstash . batchJSON ( batchPayload ) ;
215215 await deleteOutgoingRequests ( requests . map ( ( request ) => request . id ) ) ;
216216 processSpan . setAttribute ( "stack.external-db-sync.processed-count" , requests . length ) ;
217+ console . log ( `[Poller] Processed requests: ${ requests . length } ` ) ;
217218 return requests . length ;
218219 } catch ( error ) {
219220 processSpan . setAttribute ( "stack.external-db-sync.iteration-error" , true ) ;
Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ async function backfillSequenceIds(batchSize: number): Promise<boolean> {
137137 }
138138
139139 span . setAttribute ( "stack.external-db-sync.did-update" , didUpdate ) ;
140+ if ( didUpdate ) {
141+ console . log ( `[Sequencer] Backfilled sequence IDs: USR=${ projectUserTenants . length } , CC=${ contactChannelTenants . length } , DR=${ deletedRowTenants . length } ` ) ;
142+ }
140143
141144 return didUpdate ;
142145 } ) ;
@@ -211,6 +214,7 @@ export const GET = createSmartRouteHandler({
211214 try {
212215 const didUpdate = await backfillSequenceIds ( batchSize ) ;
213216 iterationSpan . setAttribute ( "stack.external-db-sync.did-update" , didUpdate ) ;
217+ console . log ( `[Sequencer] Backfilled ${ didUpdate ? "some" : "no" } sequence IDs` ) ;
214218 } catch ( error ) {
215219 iterationSpan . setAttribute ( "stack.external-db-sync.iteration-error" , true ) ;
216220 captureError (
You can’t perform that action at this time.
0 commit comments