fix(redis): maximize retry window
Build and Push Image / build-backend (push) Successful in 27s
Build and Push Image / build-frontend (push) Successful in 2m4s
Build and Push Image / push (push) Successful in 59s

This commit is contained in:
2026-09-21 18:08:16 +00:00 Unverified
parent 598266f3e3
commit 1492c0a442
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -1,7 +1,10 @@
import ReconnectingEventSource from "reconnecting-eventsource";
import type z from "zod";
export const redis = typeof Bun !== "undefined" ? Bun.redis : null;
export const redis =
typeof Bun !== "undefined"
? new Bun.RedisClient(undefined, { maxRetries: 4294967295 })
: null;
type PubPayload = { event?: string; data: unknown };
@@ -126,7 +129,7 @@ export class EventSourceEndpoint<T extends EventSourceEventMap> {
throw new Error(
"EventSourceEndpoint.pub(...) can only be called on the server.",
);
return this.manager.publish(this.eventMap[event].parse(data), {
this.manager.publish(this.eventMap[event].parse(data), {
topic: this.endpoint,
event: String(event),
});