summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--worker.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/worker.js b/worker.js
index e6790ab..733b33a 100644
--- a/worker.js
+++ b/worker.js
@@ -168,6 +168,7 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => {
const match = JSON.parse(msg.content);
// deduplicate and reject immediately
if (await model.Match.count({ where: { api_id: match.id } }) > 0) {
+ logger.info("duplicate match", match.id);
if (msg.properties.headers.notify) {
await ch.publish("amq.topic",
msg.properties.headers.notify,
@@ -179,6 +180,7 @@ amqp.connect(RABBITMQ_URI).then(async (rabbit) => {
}
await ch.nack(msg, false, false);
} else if (match.rosters.length < 2 || match.rosters[0].id == "null") {
+ logger.info("invalid match", match.id);
// it is really `"null"`.
// reject invalid matches (handling API bugs)
await ch.nack(msg, false, false);