Skip to content

Commit

Permalink
fix: added gzip compression to bounce report
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Sep 13, 2023
1 parent 17a0001 commit 6c0f483
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jobs/bounce-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
require('#config/env');

const process = require('node:process');
const zlib = require('node:zlib');
const { parentPort } = require('node:worker_threads');

// eslint-disable-next-line import/no-unassigned-import
Expand Down Expand Up @@ -234,8 +235,8 @@ function makeDelimitedString(arr) {
{
filename: `email-deliverability-logs-${dayjs(now).format(
'YYYY-MM-DD-h-mm-A-z'
)}.csv`.toLowerCase(),
content: csv.join('\n')
)}.csv.gz`.toLowerCase(),
content: zlib.gzipSync(csv.join('\n'), { level: 9 })
}
]
},
Expand Down

0 comments on commit 6c0f483

Please sign in to comment.