Skip to content

Commit

Permalink
feat(teardown): end pg-pool
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-pr-p committed Mar 4, 2021
1 parent 5958244 commit 94afaad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/acker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ export const createAcker = () => {
}
}, REQUEUE_CHECK);

process.on('exit', () => {
process.on('exit', async () => {
clearTimeout(timeout);
await pool.end();
});

return async (message: Notification) => {
Expand Down

0 comments on commit 94afaad

Please sign in to comment.