From 058a2735050727367a1ee7fc68f0600b7bd94db7 Mon Sep 17 00:00:00 2001 From: Giulia Naponiello Date: Nov 27 2018 13:18:33 +0000 Subject: Support new types in ResultsDB consumer New subject types are now accepted in Greenwave, but we need to handle them also in the ResultsDB consumer. These new types are component-version and redhat-module. --- diff --git a/greenwave/consumers/resultsdb.py b/greenwave/consumers/resultsdb.py index 9d584b5..990457c 100644 --- a/greenwave/consumers/resultsdb.py +++ b/greenwave/consumers/resultsdb.py @@ -156,10 +156,9 @@ class ResultsDBHandler(fedmsg.consumers.FedmsgConsumer): return value _type = _decode(data.get('type')) - if _type == 'bodhi_update' and 'item' in data: - yield ('bodhi_update', _decode(data['item'])) - if _type == 'compose' and 'item' in data: - yield ('compose', _decode(data['item'])) + if _type in ['bodhi_update', 'compose', 'component-version', 'redhat-module'] and ( + 'item' in data): + yield (_type, _decode(data['item'])) if 'productmd.compose.id' in data: yield ('compose', _decode(data['productmd.compose.id'])) if (_type == 'koji_build' and 'item' in data or