@@ -165,7 +165,7 @@ export class DOQueueHandler extends DurableObject<CloudflareEnv> {
165165 "INSERT OR REPLACE INTO sync (id, lastSuccess, buildId) VALUES (?, unixepoch(), ?)" ,
166166 // We cannot use the deduplication id because it's not unique per route - every time a route is revalidated, the deduplication id is different.
167167 `${ host } ${ url } ` ,
168- process . env . __NEXT_BUILD_ID
168+ process . env . __OPEN_NEXT_BUILD_ID
169169 ) ;
170170 }
171171 // If everything went well, we can remove the route from the failed state
@@ -238,7 +238,7 @@ export class DOQueueHandler extends DurableObject<CloudflareEnv> {
238238 "INSERT OR REPLACE INTO failed_state (id, data, buildId) VALUES (?, ?, ?)" ,
239239 msg . MessageDeduplicationId ,
240240 JSON . stringify ( updatedFailedState ) ,
241- process . env . __NEXT_BUILD_ID
241+ process . env . __OPEN_NEXT_BUILD_ID
242242 ) ;
243243 }
244244 // We probably want to do something if routeInFailedState is becoming too big, at least log it
@@ -273,8 +273,8 @@ export class DOQueueHandler extends DurableObject<CloudflareEnv> {
273273
274274 // Before doing anything else, we clear the DB for any potential old data
275275 // TODO: extract this to a function so that it could be called by the user at another time than init
276- this . sql . exec ( "DELETE FROM failed_state WHERE buildId != ?" , process . env . __NEXT_BUILD_ID ) ;
277- this . sql . exec ( "DELETE FROM sync WHERE buildId != ?" , process . env . __NEXT_BUILD_ID ) ;
276+ this . sql . exec ( "DELETE FROM failed_state WHERE buildId != ?" , process . env . __OPEN_NEXT_BUILD_ID ) ;
277+ this . sql . exec ( "DELETE FROM sync WHERE buildId != ?" , process . env . __OPEN_NEXT_BUILD_ID ) ;
278278
279279 const failedStateCursor = this . sql . exec < { id : string ; data : string } > ( "SELECT * FROM failed_state" ) ;
280280 for ( const row of failedStateCursor ) {
0 commit comments