fix(news): persist publication requests and retry cache delivery
This commit is contained in:
1 parent
c977fe95ba
commit
52f6d1491f
40 files changed
+733
-134
No files matched your search
@@ -30,3 +30,11 @@ export async function invalidateNewsCache(): Promise<void> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/** Worker delivery must fail visibly so the outbox can retry the invalidation. */
|
||||
export async function refreshNewsCacheForDelivery(): Promise<void> {
|
||||
if (!redis) return;
|
||||
if (redis.status === "end")
|
||||
throw new Error("News cache connection is closed");
|
||||
await redis.set(REVISION_KEY, randomUUID());
|
||||
}
|
||||
Reference in new issue
Block a user