1
0
Fork 0
peertube/server/lib/job-queue/handlers/email.ts
2022-08-09 09:18:07 +02:00

17 lines
456 B
TypeScript

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