From bf83ba4923cc37fade091d0c0f761bf016f66b73 Mon Sep 17 00:00:00 2001 From: Giulia Naponiello Date: Aug 08 2018 09:11:37 +0000 Subject: Waiverdb consumer stops if error occurs ...and this is bad. Waiverdb consumer checks for each policy related if there is a decision change and if it has to publish a message about it. But if an error occurs during the decision (real life example: the policy with the specified parameters does not exist) the consumer just raises an exception and does not continue with the other policies. --- diff --git a/greenwave/consumers/waiverdb.py b/greenwave/consumers/waiverdb.py index 7154790..309b013 100644 --- a/greenwave/consumers/waiverdb.py +++ b/greenwave/consumers/waiverdb.py @@ -100,7 +100,7 @@ class WaiverDBHandler(fedmsg.consumers.FedmsgConsumer): if not response.ok: log.error(response.text) - response.raise_for_status() + continue decision = response.json() @@ -115,7 +115,7 @@ class WaiverDBHandler(fedmsg.consumers.FedmsgConsumer): if not response.ok: log.error(response.text) - response.raise_for_status() + continue old_decision = response.json()