Merge branch 'master' of gitea:GoldenPogacsa/producer
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
commit
06671e29b8
@ -33,9 +33,10 @@ class ConsumerLocator:
|
|||||||
""""
|
""""
|
||||||
Learns the list of consumers.
|
Learns the list of consumers.
|
||||||
"""
|
"""
|
||||||
#TODO improve learning
|
recievedconsumerlist = self.communicator.discoveravailableconsumers()
|
||||||
recievedConsumerList = self.communicator.discoveravailableconsumers()
|
if recievedconsumerlist is None:
|
||||||
for consumer in recievedConsumerList:
|
return
|
||||||
|
for consumer in recievedconsumerlist:
|
||||||
self.consumerList.append({"Host": consumer, "State": True, "LastOk": datetime.datetime.now()})
|
self.consumerList.append({"Host": consumer, "State": True, "LastOk": datetime.datetime.now()})
|
||||||
self.updateConsumerList()
|
self.updateConsumerList()
|
||||||
|
|
||||||
@ -71,6 +72,7 @@ class ConsumerLocator:
|
|||||||
break
|
break
|
||||||
|
|
||||||
self.currentConsumer = newCurrentConsumer
|
self.currentConsumer = newCurrentConsumer
|
||||||
|
self.learnconsumerlist()
|
||||||
|
|
||||||
if self.currentConsumer is not None:
|
if self.currentConsumer is not None:
|
||||||
return self.currentConsumer["Host"]
|
return self.currentConsumer["Host"]
|
||||||
|
Reference in New Issue
Block a user