diff --git a/ConsumerLocator.py b/ConsumerLocator.py index e70816d..a3061a9 100644 --- a/ConsumerLocator.py +++ b/ConsumerLocator.py @@ -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