Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| await enqueueRealtimeEvent(`prisma:${model}:${params.action}`, { | ||
| model, | ||
| action: params.action, | ||
| args: params.args, | ||
| result, | ||
| timestamp: Date.now(), | ||
| }) |
There was a problem hiding this comment.
Avoid hanging Prisma writes when Redis is down
Each Prisma mutation awaits enqueueRealtimeEvent, and the Redis clients created in lib/redis.ts set maxRetriesPerRequest: null (infinite retries). When Redis is unavailable or misconfigured, queue.add never resolves nor rejects, so every database write waits forever before the middleware returns. This change effectively makes all writes dependent on Redis uptime even though the realtime queue is optional. Consider not awaiting the enqueue call or adding a bounded timeout/retry so mutations can complete even when Redis is offline.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_6908c14c86ac832ca53a61044f630ab9