feat(account, queues): enhance email sending and Redis connection settings

- Added attempts and removal options for email queue tasks in `account.service.ts`.
- Updated Redis connection parameters to specify `maxRetriesPerRequest` and disable `enableReadyCheck` in `connection.ts`.
- Introduced an empty line for clarity in the `email.queue.ts` file.
This commit is contained in:
abumahid
2026-04-26 19:04:34 +06:00
parent e227c42f7d
commit f886c392aa
3 changed files with 7 additions and 1 deletions
@@ -71,6 +71,10 @@ const create_account_into_db = async (req: Request) => {
subject: "Welcome to Quick Launch - Verification OTP",
email: payload.email,
textBody: "You can use otp or verification link for verifying your account"
}, {
attempts: 1,
removeOnComplete: true,
removeOnFail: true,
})
return null;
};
+2 -1
View File
@@ -3,5 +3,6 @@ import { configs } from "../configs/index.js";
export const redisConnection = new Redis(configs.redis_url as string, {
tls: {},
maxRetriesPerRequest: null,
maxRetriesPerRequest: 1,
enableReadyCheck: false,
});
+1
View File
@@ -13,4 +13,5 @@ export type TEmailQueue = {
export const emailQueue = new Queue<TEmailQueue>("email-queue", {
connection: redisConnection,
});