Adjusted method names in ConsumerLocator

This commit is contained in:
Scharnitzky Donát 2020-03-29 16:57:13 +02:00
parent ee9f62c868
commit 127ed18c33

View File

@ -41,7 +41,7 @@ class ConsumerLocator:
"""
removeList = []
for consumer in self.consumerList:
if not communicator.isconsumeravailable(consumer["Host"]):
if not communicator.checkconsumer(consumer["Host"]):
consumer["State"] = False
if datetime.datetime.now() - consumer["LastOk"] > datetime.timedelta(hours=1):
removeList.append(consumer)
@ -80,12 +80,12 @@ class ConsumerLocator:
"""
return self.currentConsumer["Host"]
def checkconsumer(self):
def checkcurrentconsumer(self):
"""
Check the consumers health.
:return: True if OK, False if fail
"""
if communicator.isconsumeravailable(self.currentConsumer["Host"]):
if communicator.checkconsumer(self.currentConsumer["Host"]):
return True
else:
return False