From 58f2742a3069336fe925f5c38715552b463a68af Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 25 Jul 2017 19:53:07 +0200 Subject: debug match dupes --- worker.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'worker.js') 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); -- cgit v1.3.1