diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-28 12:20:24 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-28 12:20:24 +0200 |
| commit | f997e4dd53886da95c9b7cc98816f7936b89cd0f (patch) | |
| tree | 63a742a62ffaf7fc47e09a8c3c428d2953b19591 | |
| parent | a05e70477f930816aa9707b1c09428f8f1a6f2e4 (diff) | |
| download | shrinker-f997e4dd53886da95c9b7cc98816f7936b89cd0f.tar.gz shrinker-f997e4dd53886da95c9b7cc98816f7936b89cd0f.zip | |
send telemetry notif via header info
| -rw-r--r-- | worker.js | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -696,7 +696,6 @@ function flatten(obj) { transaction_profiler.done("database transaction"); // notify web - // …about new matches await Promise.map(msgs, async (m) => { if (m.properties.headers.notify == undefined) return; let notif = "error"; @@ -704,6 +703,8 @@ function flatten(obj) { if (m.properties.type == "match") notif = "matches_update"; // player obj updated if (m.properties.type == "player") notif = "stats_update"; + // new phases + if (m.properties.type == "telemetry") notif = "phases_update"; await ch.publish("amq.topic", m.properties.headers.notify, new Buffer(notif)); @@ -711,10 +712,6 @@ function flatten(obj) { // …global about new matches if (match_records.length > 0) await ch.publish("amq.topic", "global", new Buffer("matches_update")); - // …about new phases - await Promise.map(telemetry_objects, async (t) => - await ch.publish("amq.topic", "match." + t.match_api_id, - new Buffer("phases_update")) ); } // Split participant API data into participant and participant_stats |
