Skip to content

Commit

Permalink
Merge pull request #4482 from omnivore-app/jacksonh/email-logging
Browse files Browse the repository at this point in the history
Add more logging to email sends
  • Loading branch information
jacksonh authored Nov 2, 2024
2 parents b7958fd + 3b7fc2b commit 11144ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/api/src/jobs/email/send_email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 6 additions & 0 deletions packages/api/src/services/send_emails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 11144ff

Please sign in to comment.