Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
)
const elapsedTime = performance.now() - now
console.info(
- `Received in ${elapsedTime.toFixed(
- 2
- )}ms an array with ${responses.length.toString()} responses from ${parallelism.toString()} parallel requests made with HTTP client pool task function ${workerFunction} on ${requestUrl}:\n`,
+ `Received in ${elapsedTime.toFixed(2)}ms an array with ${responses.length.toString()} responses from ${parallelism.toString()} parallel requests made with HTTP client pool task function ${workerFunction} on ${requestUrl}:\n`,
responses
)
} catch (error) {
try {
const now = performance.now()
- await smtpClientPool.mapExecute(smtpMessages)
+ const responses = await smtpClientPool.mapExecute(smtpMessages)
const elapsedTime = performance.now() - now
console.info(
- `Send in parallel in ${elapsedTime.toFixed(
- 2
- )}ms ${tos.length.toString()} mails with SMTP client pool`
+ `Send in parallel in ${elapsedTime.toFixed(2)}ms ${tos.length.toString()} mails with SMTP client pool:\n`,
+ responses
)
} catch (error) {
console.error(error)