forEach with an async callback reported success before any email was sent
A Node.js job marked a batch of reminder emails as sent and exited, while most sends were still in flight or had failed. The cause was forEach with an async callback. How we proved it, and when to use for...of, Promise.all, allSettled or a concurrency limit.