From c9fc07d0d385fea6b451874f96a098eae12f6436 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 28 May 2017 12:18:56 +0200 Subject: send notif header for telemetry --- worker.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/worker.js b/worker.js index 472d100..a3c308d 100644 --- a/worker.js +++ b/worker.js @@ -130,11 +130,13 @@ if (LOGGLY_TOKEN) gamePhase(0, 30 * 60), // late game gamePhase(0, 90 * 60) // still playing? ]; - await Promise.each(phases, async (phase) => { + await Promise.each(phases, async (phase, idx, len) => { if (phase.data.length > 0) await ch.sendToQueue(PROCESS_QUEUE, new Buffer( - JSON.stringify(phase)), - { persistent: true, type: "telemetry" }) + JSON.stringify(phase)), { + persistent: true, type: "telemetry", + headers: idx == len - 1? { notify: "match." + match_api_id } : {} + }) }); logger.info("Telemetry done", { url: url, match_api_id: match_api_id }); -- cgit v1.3.1