Skip to content

Commit 89dd68a

Browse files
committed
fix rebase
1 parent d58cec9 commit 89dd68a

File tree

1 file changed

+4
-1
lines changed
  • packages/cloudflare/src/api/durable-objects

1 file changed

+4
-1
lines changed

packages/cloudflare/src/api/durable-objects/queue.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
7676
// The route is already in a failed state, it will be retried later
7777
if (this.routeInFailedState.has(msg.MessageDeduplicationId)) return;
7878

79+
// If the last success is newer than the last modified, it's likely that the regional cache is out of date
80+
// We don't need to revalidate in this case
81+
if (this.checkSyncTable(msg)) return;
82+
7983
if (this.ongoingRevalidations.size >= this.maxRevalidations) {
8084
debug(
8185
`The maximum number of revalidations (${this.maxRevalidations}) is reached. Blocking until one of the revalidations finishes.`
@@ -180,7 +184,6 @@ export class DurableObjectQueueHandler extends DurableObject<CloudflareEnv> {
180184
for (const event of allEventsToRetry) {
181185
debug(`Retrying revalidation for ${event.msg.MessageBody.host}${event.msg.MessageBody.url}`);
182186
await this.executeRevalidation(event.msg);
183-
this.routeInFailedState.delete(event.msg.MessageDeduplicationId);
184187
}
185188
}
186189

0 commit comments

Comments
 (0)