diff --git a/jobs/bounce-report.js b/jobs/bounce-report.js index b7119c0a22..0b97cfb192 100644 --- a/jobs/bounce-report.js +++ b/jobs/bounce-report.js @@ -97,7 +97,7 @@ function makeDelimitedString(arr) { }, bounce_category: { $ne: 'none' } }) - .sort({ bounce_category: 1 }) + .sort({ created_at: 1, bounce_category: 1 }) .cursor() .addCursorFlag('noCursorTimeout', true)) { if (typeof log?.err?.bounceInfo?.category !== 'string') continue; @@ -194,7 +194,7 @@ function makeDelimitedString(arr) { // super rudimentary and simple string concatenation const list = []; - for (const key of Object.keys(categories)) { + for (const key of Object.keys(categories).sort()) { list.push( `
  • ${titleize(humanize(key))}: ${ categories[key] @@ -213,6 +213,7 @@ function makeDelimitedString(arr) { ``, `

    Trusted hosts that were blocked:

    `, `` ].join('\n');