Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/web/src/lib/video-pack-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ function recordHash(record: VideoPackRecord): string {

async function getRedis(): Promise<VideoPackRedisClient | null> {
if (redisPromise) return redisPromise;
let promise: Promise<VideoPackRedisClient | null>;
promise = (async () => {
const promise = (async (): Promise<VideoPackRedisClient | null> => {
const creds = resolveUpstashRedisCredentials();
if (!creds) {
return null;
Expand All @@ -129,9 +128,7 @@ async function getRedis(): Promise<VideoPackRedisClient | null> {
console.error('[video-pack-store] Redis client init failed:', error);
// Clear the memoized promise so a transient init failure does not
// permanently poison the client, and fall back to the in-memory store.
if (redisPromise === promise) {
redisPromise = null;
}
redisPromise = null;
return null;
}
})();
Expand Down
Loading