Added some comments to ConsumerLocator
This commit is contained in:
parent
48d6fb2cc1
commit
98b1bb8e56
@ -14,7 +14,14 @@ __version__text__ = "1"
|
||||
|
||||
class ConsumerLocator:
|
||||
|
||||
"""
|
||||
Manages the list of consumers.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Initialize class.
|
||||
"""
|
||||
self.consumerList = [{"Host": "KnownHost", "State": True, "LastOk": datetime.datetime.now()}]
|
||||
self.currentConsumer = self.consumerList[0]["Host"]
|
||||
|
||||
@ -45,9 +52,8 @@ class ConsumerLocator:
|
||||
def updateConsumer(self):
|
||||
"""
|
||||
Checks all the consumers in the list and updates the current consumer if necessary.
|
||||
:return: the current consumer
|
||||
:return: the current consumer or None if there are no available customers at the moment.
|
||||
"""
|
||||
|
||||
self.updateConsumerList()
|
||||
|
||||
if not self.checkConsumer():
|
||||
|
Reference in New Issue
Block a user