mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-11 17:14:59 +08:00
Make fake MBS messages JSON serializable.
Which prevents errors when fedmsg-hub tries to checkpoint its progress on disk in prod.
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