import { Queue } from 'bullmq';
import { redisConfig } from './config.js';

export const notificationQueue = new Queue('notificationQueue', {
    connection: redisConfig
});

export const addNotificationJob = async (data: any) => {
    await notificationQueue.add('sendNotification', data, {
        attempts: 3,
        backoff: {
            type: 'exponential',
            delay: 5000
        }
    });
};
