Added redis to consumerlocator

This commit is contained in:
2020-04-17 16:47:27 +02:00
parent eff5f4191c
commit 4a3fc3b1ba
3 changed files with 33 additions and 23 deletions

4
app.py
View File

@@ -13,6 +13,7 @@ import time
from communicator import Communicator
from consumerlocator import ConsumerLocator
from messagesender import MessageSender
from redisconnector import RedisConnector
__author__ = "@tormakris"
__copyright__ = "Copyright 2020, GoldenPogácsa Team"
@@ -39,7 +40,8 @@ if __name__ == "__main__":
generateduuid = str(uuid.uuid4())
communicator = Communicator(currentconsumer=KNOWNCONSUMER, uuid=generateduuid)
LOGGER.debug(f"My uuid is {generateduuid}")
consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator)
consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator,
redisconnector=RedisConnector())
messagesender = MessageSender(communicator=communicator)
consumerlocator.learnconsumerlist()