Renamed method to lower case in ConsumerLocator
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:
parent
25d582cccc
commit
b13b7884b2
@ -26,7 +26,7 @@ class ConsumerLocator:
|
||||
self.consumerList = [{"Host": "KnownHost", "State": True, "LastOk": datetime.datetime.now()}]
|
||||
self.currentConsumer = self.consumerList[0]["Host"]
|
||||
|
||||
def learnConsumerList(self):
|
||||
def learnconsumerlist(self):
|
||||
""""
|
||||
Learns the list of consumers.
|
||||
"""
|
||||
@ -35,7 +35,7 @@ class ConsumerLocator:
|
||||
self.consumerList.append({"Host": consumer, "State": True, "LastOk": datetime.datetime.now()})
|
||||
self.updateConsumerList()
|
||||
|
||||
def updateConsumerList(self):
|
||||
def updateconsumerlist(self):
|
||||
"""
|
||||
Updates the consumer list based on their availability.
|
||||
"""
|
||||
@ -50,7 +50,7 @@ class ConsumerLocator:
|
||||
for rem in removeList:
|
||||
self.consumerList.remove(rem)
|
||||
|
||||
def updateConsumer(self):
|
||||
def updateconsumer(self):
|
||||
"""
|
||||
Checks all the consumers in the list and updates the current consumer if necessary.
|
||||
:return: the current consumer or None if there are no available customers at the moment.
|
||||
@ -73,14 +73,14 @@ class ConsumerLocator:
|
||||
else:
|
||||
return None
|
||||
|
||||
def getCurrentConsumer(self):
|
||||
def getcurrentconsumer(self):
|
||||
"""
|
||||
Returns the currently selected consumer.
|
||||
:return: the current consumer
|
||||
"""
|
||||
return self.currentConsumer["Host"]
|
||||
|
||||
def checkConsumer(self):
|
||||
def checkconsumer(self):
|
||||
"""
|
||||
Check the consumers health.
|
||||
:return: True if OK, False if fail
|
||||
|
Reference in New Issue
Block a user