1 import * as Bull from 'bull'
2 import { logger } from '../../../helpers/logger'
3 import { Emailer } from '../../emailer'
5 export type EmailPayload = {
11 async function processEmail (job: Bull.Job) {
12 const payload = job.data as EmailPayload
13 logger.info('Processing email in job %d.', job.id)
15 return Emailer.Instance.sendMail(payload.to, payload.subject, payload.text)
18 // ---------------------------------------------------------------------------