From c49a99b3d3525681a443770e48abf9342368f437 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sun, 13 Feb 2022 04:15:37 +0300 Subject: [PATCH] Update cluster/load.js --- scripts/commands/cluster/load.js | 8 +++++++- tests/__data__/expected/logs/cluster/load/cluster_1.log | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/commands/cluster/load.js b/scripts/commands/cluster/load.js index 9c58905b7f..e220aba702 100644 --- a/scripts/commands/cluster/load.js +++ b/scripts/commands/cluster/load.js @@ -42,7 +42,13 @@ async function main() { } else { logger.info(`${message} (${result.error})`) } - await file.append(clusterLog, JSON.stringify(result) + '\n') + const output = { + _id: result._id, + error: result.error, + streams: result.streams, + requests: result.requests + } + await file.append(clusterLog, JSON.stringify(output) + '\n') } logger.info(`done in ${timer.format('HH[h] mm[m] ss[s]')}`) diff --git a/tests/__data__/expected/logs/cluster/load/cluster_1.log b/tests/__data__/expected/logs/cluster/load/cluster_1.log index 68156ac32e..c32879e930 100644 --- a/tests/__data__/expected/logs/cluster/load/cluster_1.log +++ b/tests/__data__/expected/logs/cluster/load/cluster_1.log @@ -1,2 +1,2 @@ -{"_id":"2ST8btby3mmsgPF0","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http":{"referrer":"","user-agent":""},"error":"Operation timed out","streams":[],"requests":[]} -{"_id":"I6cjG2xCBRFFP4sz","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http":{"referrer":"","user-agent":""},"error":"Operation timed out","streams":[],"requests":[]} +{"_id":"2ST8btby3mmsgPF0","error":"Operation timed out","streams":[],"requests":[]} +{"_id":"I6cjG2xCBRFFP4sz","error":"Operation timed out","streams":[],"requests":[]}