✨ 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:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
@@ -13,4 +13,5 @@ export type TEmailQueue = {
|
||||
|
||||
export const emailQueue = new Queue<TEmailQueue>("email-queue", {
|
||||
connection: redisConnection,
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user