Adjusted method names in ConsumerLocator
This commit is contained in:
parent
ee9f62c868
commit
127ed18c33
@ -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
|
||||
|
Reference in New Issue
Block a user