1
0
Fork 0
peertube/server/lib/job-queue/handlers/email.ts
2020-05-04 16:21:39 +02:00

17 lines
461 B
TypeScript

import * as Bull from 'bull'
import { logger } from '../../../helpers/logger'
import { Emailer } from '../../emailer'
import { EmailPayload } from '@shared/models'
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
}