diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-25 19:53:07 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-07-25 19:53:07 +0200 |
| commit | 58f2742a3069336fe925f5c38715552b463a68af (patch) | |
| tree | 6dae60d0fbfbbcdcd3ab9039275e6c6bbe143e77 | |
| parent | 9657f640e5dab17d6c2c6cd838a26c741768bebb (diff) | |
| download | processor-58f2742a3069336fe925f5c38715552b463a68af.tar.gz processor-58f2742a3069336fe925f5c38715552b463a68af.zip | |
debug match dupes
| -rw-r--r-- | worker.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |
