diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-28 12:18:56 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-28 12:18:56 +0200 |
| commit | c9fc07d0d385fea6b451874f96a098eae12f6436 (patch) | |
| tree | dffe5f9e2f9da5b278a413f5235adf640a3e328c | |
| parent | d1c7fc202bcd0cdd7dd905c6e1c9c4e48e7b6223 (diff) | |
| download | telesucker-c9fc07d0d385fea6b451874f96a098eae12f6436.tar.gz telesucker-c9fc07d0d385fea6b451874f96a098eae12f6436.zip | |
send notif header for telemetryrelease/2.5.0
| -rw-r--r-- | worker.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 }); |
