Skip to content

Commit

Permalink
flush the logger at the end of the route
Browse files Browse the repository at this point in the history
  • Loading branch information
konstrybakov committed Jul 25, 2024
1 parent 5d21816 commit bb0848b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api/email/jobs/route.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Jobs from '@/emails/jobs'
import { queryGetJobs } from '@/lib/db/queries'
import { logger, transport } from '@/lib/logger'
import { logger } from '@/lib/logger'
import { render } from '@react-email/render'
import { ReasonPhrases, StatusCodes } from 'http-status-codes'
import { headers } from 'next/headers'
Expand Down Expand Up @@ -64,6 +64,6 @@ export const GET = async () => {
} finally {
logger.info('Finished `send-email` cron job')

await transport.end()
logger.flush()
}
}

0 comments on commit bb0848b

Please sign in to comment.