diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-12-21 21:33:09 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-12-21 21:33:09 +0100 |
| commit | 5cf876b99ecf85a6a5e5ab4bb3ce0b03e8f1ccb4 (patch) | |
| tree | 1277fe429b97175f25eb0b82fd02fea6f583731f | |
| parent | 5ab44eeca78f2feecbae553650c16ef8cedc35dc (diff) | |
| download | processor-5cf876b99ecf85a6a5e5ab4bb3ce0b03e8f1ccb4.tar.gz processor-5cf876b99ecf85a6a5e5ab4bb3ce0b03e8f1ccb4.zip | |
only forward casual/ranked to analyzer
| -rw-r--r-- | worker.js | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -290,13 +290,15 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => { // notify follow up services if (DOANALYZEMATCH) { await Promise.each(match_objects, async (msg) => { - await ch.publish("amq.topic", msg.properties.headers.notify, - new Buffer("analyze_pending")); - await ch.sendToQueue(ANALYZE_QUEUE, - new Buffer(msg.content.id), { - persistent: true, - headers: { notify: msg.properties.headers.notify } - }); + if (["casual", "ranked"].includes(msg.content.game_mode)) { + await ch.publish("amq.topic", msg.properties.headers.notify, + new Buffer("analyze_pending")); + await ch.sendToQueue(ANALYZE_QUEUE, + new Buffer(msg.content.id), { + persistent: true, + headers: { notify: msg.properties.headers.notify } + }); + } }); } } catch (err) { |
