Py3: Fix encoding of message in RetryEngine
Change-Id: I07b96fb8ed486d620f9911827a1f3182fe0e9b84
This commit is contained in:
parent
be267e3c10
commit
c8b9b81f61
@ -17,11 +17,12 @@
|
||||
import json
|
||||
import time
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
from monasca_common.kafka import consumer
|
||||
from monasca_common.kafka import producer
|
||||
from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from six import PY3
|
||||
|
||||
from monasca_notification.common.utils import construct_notification_object
|
||||
from monasca_notification.common.utils import get_db_repo
|
||||
from monasca_notification.common.utils import get_statsd_client
|
||||
@ -51,6 +52,7 @@ class RetryEngine(object):
|
||||
for raw_notification in self._consumer:
|
||||
message = raw_notification[1].message.value
|
||||
|
||||
message = message.decode('UTF-8') if PY3 else message
|
||||
notification_data = json.loads(message)
|
||||
|
||||
notification = construct_notification_object(self._db_repo, notification_data)
|
||||
|
Loading…
Reference in New Issue
Block a user