Skip to content

Commit 569f69d

Browse files
committed
fix rebase
1 parent cbcedbf commit 569f69d

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
@@ -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

0 commit comments

Comments
 (0)