diff --git a/lib/tfw/networking/message_sender.py b/lib/tfw/networking/message_sender.py index 58856b1..2b946d7 100644 --- a/lib/tfw/networking/message_sender.py +++ b/lib/tfw/networking/message_sender.py @@ -44,3 +44,11 @@ class MessageSender: 'key': self.queue_key, 'data': data }) + + @staticmethod + def generate_messages_from_queue(queue_messsge): + for message in queue_messsge['data']['messages']: + yield { + 'key': 'message', + 'data': message + }