summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-07-25 19:53:07 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-07-25 19:53:07 +0200
commit58f2742a3069336fe925f5c38715552b463a68af (patch)
tree6dae60d0fbfbbcdcd3ab9039275e6c6bbe143e77
parent9657f640e5dab17d6c2c6cd838a26c741768bebb (diff)
downloadprocessor-58f2742a3069336fe925f5c38715552b463a68af.tar.gz
processor-58f2742a3069336fe925f5c38715552b463a68af.zip
debug match dupes
-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);