Implement generating single messages from a queue

This commit is contained in:
Kristóf Tóth 2018-07-13 14:09:13 +02:00
parent d2084b2e51
commit 9c20e94dd8

View File

@ -44,3 +44,11 @@ class MessageSender:
'key': self.queue_key, 'key': self.queue_key,
'data': data 'data': data
}) })
@staticmethod
def generate_messages_from_queue(queue_messsge):
for message in queue_messsge['data']['messages']:
yield {
'key': 'message',
'data': message
}