1 import { Job } from 'bullmq'
2 import { EmailPayload } from '@shared/models'
3 import { logger } from '../../../helpers/logger'
4 import { Emailer } from '../../emailer'
6 async function processEmail (job: Job) {
7 const payload = job.data as EmailPayload
8 logger.info('Processing email in job %s.', job.id)
10 return Emailer.Instance.sendMail(payload)
13 // ---------------------------------------------------------------------------