Skip to content

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 ​

ParameterType
jobJob<Options>
mailTransporterPick<Mail, "sendMail">

Returns ​

Promise<unknown>