mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-14 06:59:47 +08:00
Merge #393 Make fake MBS messages JSON serializable.
This commit is contained in:
@@ -78,6 +78,9 @@ class BaseMessage(object):
|
||||
""" Used to trick moksha into thinking we are a dict. """
|
||||
return getattr(self, key, value)
|
||||
|
||||
def __json__(self):
|
||||
return dict(msg_id=self.msg_id, topic=self.topic, body=self.body)
|
||||
|
||||
@staticmethod
|
||||
def from_amq(topic, msg):
|
||||
msg_obj = None
|
||||
|
||||
Reference in New Issue
Block a user