Init commit
This commit is contained in:
11
server/core/lib/job-queue/handlers/email.ts
Normal file
11
server/core/lib/job-queue/handlers/email.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user