File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
7777 // The route is already in a failed state, it will be retried later
7878 if ( this . routeInFailedState . has ( msg . MessageDeduplicationId ) ) return ;
7979
80+ // If the last success is newer than the last modified, it's likely that the regional cache is out of date
81+ // We don't need to revalidate in this case
82+ if ( this . checkSyncTable ( msg ) ) return ;
83+
8084 if ( this . ongoingRevalidations . size >= this . maxRevalidations ) {
8185 debug (
8286 `The maximum number of revalidations (${ this . maxRevalidations } ) is reached. Blocking until one of the revalidations finishes.`
@@ -183,7 +187,6 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
183187 for ( const event of allEventsToRetry ) {
184188 debug ( `Retrying revalidation for ${ event . msg . MessageBody . host } ${ event . msg . MessageBody . url } ` ) ;
185189 await this . executeRevalidation ( event . msg ) ;
186- this . routeInFailedState . delete ( event . msg . MessageDeduplicationId ) ;
187190 }
188191 }
189192
Original file line number Diff line number Diff line change @@ -54,10 +54,14 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
5454 "server-functions/default" ,
5555 getPackagePath ( buildOpts ) ,
5656 ".next"
57+ )
58+ const serverFiles = path . join (
59+ baseManifestPath ,
60+ "required-server-files.json"
5761 ) ;
58- const serverFiles = path . join ( baseManifestPath , "required-server-files.json" ) ;
5962 const nextConfig = JSON . parse ( fs . readFileSync ( serverFiles , "utf-8" ) ) . config ;
6063
64+
6165 console . log ( `\x1b[35m⚙️ Bundling the OpenNext server...\n\x1b[0m` ) ;
6266
6367 await patchWebpackRuntime ( buildOpts ) ;
You can’t perform that action at this time.
0 commit comments