blob: 62701222cb2b872a578738e614684565a5c24801 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import * as Bull from 'bull'
import { logger } from '../../../helpers/logger'
import { Emailer, SendEmailOptions } from '../../emailer'
export type EmailPayload = SendEmailOptions
async function processEmail (job: Bull.Job) {
const payload = job.data as EmailPayload
logger.info('Processing email in job %d.', job.id)
return Emailer.Instance.sendMail(payload)
}
// ---------------------------------------------------------------------------
export {
processEmail
}
|