diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-23 19:46:50 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-08-23 19:46:50 +0200 |
| commit | a3c78c9512b96a211ac445b68d5af8922d3fc37a (patch) | |
| tree | bdb0aeafe9a9fad745ff89bbceb1e2ead6bee7aa | |
| parent | 1f4bfcca02b5b6006f69f56e9e384d6fdf2d727b (diff) | |
| download | cruncher-a3c78c9512b96a211ac445b68d5af8922d3fc37a.tar.gz cruncher-a3c78c9512b96a211ac445b68d5af8922d3fc37a.zip | |
add crunch_update notification according to header
| -rw-r--r-- | worker.js | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -193,11 +193,12 @@ ${columnName} = column_create(` + await Promise.map(msgs, async (m) => await ch.ack(m)); // notify web - // TODO notify for player too - await Promise.map(api_ids, async (id) => { - await ch.publish("amq.topic", - "crunch." + id, - new Buffer("points_update")); + await Promise.map(msgs, async (m) => { + if (m.properties.headers.notify) + await ch.publish("amq.topic", + m.properties.headers.notify, + new Buffer("crunch_update") + ); }); } |
