summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--worker.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/worker.js b/worker.js
index ed0bf10..33dba6a 100644
--- a/worker.js
+++ b/worker.js
@@ -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) {