Chocobozzz/PeerTube

View on GitHub
server/core/lib/job-queue/handlers/email.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Job } from 'bullmq'
import { EmailPayload } from '@peertube/peertube-models'
import { logger } from '../../../helpers/logger.js'
import { Emailer } from '../../emailer.js'

export function processEmail (job: Job) {
  const payload = job.data as EmailPayload
  logger.info('Processing email in job %s.', job.id)

  return Emailer.Instance.sendMail(payload)
}