fix typos in base agent
This commit is contained in:
parent
08df6f8a46
commit
019bc75bbf
@ -161,9 +161,10 @@ class TeethAgentHeartbeater(threading.Thread):
|
|||||||
def do_heartbeat(self):
|
def do_heartbeat(self):
|
||||||
try:
|
try:
|
||||||
deadline = self.api.heartbeat(
|
deadline = self.api.heartbeat(
|
||||||
self.agent.get_agent_url(),
|
|
||||||
mac_addr=self.agent.get_agent_mac_addr(),
|
mac_addr=self.agent.get_agent_mac_addr(),
|
||||||
version=self.agent.version)
|
url=self.agent.get_agent_url(),
|
||||||
|
version=self.agent.version,
|
||||||
|
mode=self.agent.mode)
|
||||||
self.error_delay = self.initial_delay
|
self.error_delay = self.initial_delay
|
||||||
except Exception:
|
except Exception:
|
||||||
deadline = time.time() + self.error_delay
|
deadline = time.time() + self.error_delay
|
||||||
@ -203,8 +204,8 @@ class BaseTeethAgent(object):
|
|||||||
def get_agent_url(self):
|
def get_agent_url(self):
|
||||||
# If we put this behind any sort of proxy (ie, stunnel) we're going to
|
# If we put this behind any sort of proxy (ie, stunnel) we're going to
|
||||||
# need to (re)think this.
|
# need to (re)think this.
|
||||||
return 'http://{api_host}:{api_port}/'.format(host=self.listen_host,
|
return 'http://{host}:{port}/'.format(host=self.listen_host,
|
||||||
port=self.listen_port)
|
port=self.listen_port)
|
||||||
|
|
||||||
def get_agent_mac_addr(self):
|
def get_agent_mac_addr(self):
|
||||||
return self.hardware.get_primary_mac_address()
|
return self.hardware.get_primary_mac_address()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user