Moved learning about new consumers to every cycle
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2020-04-22 03:16:28 +02:00
parent d3656b543f
commit ad44b4f134

2
app.py
View File

@ -43,9 +43,9 @@ if __name__ == "__main__":
messagesender = MessageSender(communicator=communicator, uuid=generateduuid) messagesender = MessageSender(communicator=communicator, uuid=generateduuid)
consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator, consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator,
redisconnector=RedisConnector()) redisconnector=RedisConnector())
consumerlocator.learnconsumerlist()
while True: while True:
consumerlocator.learnconsumerlist()
LOGGER.info(f"Updating consumer list of {generateduuid}") LOGGER.info(f"Updating consumer list of {generateduuid}")
consumerlocator.updateconsumer() consumerlocator.updateconsumer()
LOGGER.info("Sending message to consumer") LOGGER.info("Sending message to consumer")