Merge pull request #4482 from omnivore-app/jacksonh/email-logging

Add more logging to email sends
This commit is contained in:
Jackson Harper
2024-11-02 13:14:53 +08:00
committed by GitHub
2 changed files with 7 additions and 0 deletions

View File

@ -24,6 +24,7 @@ export type SendEmailJobData = Merge<
>
export const sendEmailJob = async (data: SendEmailJobData) => {
logger.info('sending email job:', { data })
if (!data.to) {
const user = await findActiveUser(data.userId)
if (!user) {

View File

@ -144,6 +144,12 @@ export const sendExportJobEmail = async (
throw new Error('Invalid state')
}
logger.info('enqueing email job:', {
userId,
subject,
html,
})
return enqueueSendEmail({
userId,
subject,