SudoSOS Back-end API / workers/mail-worker / processMailJob
Function: processMailJob() ​
ts
function processMailJob(job, mailTransporter?): Promise<unknown>;BullMQ job processor for the mail queue. Hands the job payload off to the SMTP transporter and re-throws so BullMQ can mark the job as failed.
Exposed as a standalone function so it can be unit tested with a stubbed transporter; production code calls it via startMailWorker.
Parameters ​
| Parameter | Type |
|---|---|
job | Job<Options> |
mailTransporter | Pick<Mail, "sendMail"> |
Returns ​
Promise<unknown>