- Add BullMQ to backend; mail jobs (verification, password reset) now enqueued instead of sent inline - Mail worker processes jobs with 3-attempt exponential backoff retry - Admin GraphQL resolvers: adminQueues, adminQueueJobs, adminRetryJob, adminRemoveJob, adminPauseQueue, adminResumeQueue - Admin frontend page at /admin/queues: queue cards with counts, job table with status filter, retry/remove/pause actions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
548 B
TypeScript
17 lines
548 B
TypeScript
function parseRedisUrl(url: string): { host: string; port: number; password?: string } {
|
|
const parsed = new URL(url);
|
|
return {
|
|
host: parsed.hostname,
|
|
port: parseInt(parsed.port) || 6379,
|
|
password: parsed.password || undefined,
|
|
};
|
|
}
|
|
|
|
// BullMQ creates its own IORedis connections from these options.
|
|
// maxRetriesPerRequest: null is required for workers.
|
|
export const redisConnectionOpts = {
|
|
...parseRedisUrl(process.env.REDIS_URL || "redis://localhost:6379"),
|
|
maxRetriesPerRequest: null as null,
|
|
enableReadyCheck: false,
|
|
};
|