added additional delay to intervalmax

Ensures only stale agents are actually listed.
1.6
enigma0x3 2015-08-12 08:59:36 -04:00
parent 6b11aba29d
commit 2140196c6d
1 changed files with 2 additions and 3 deletions

View File

@ -637,11 +637,10 @@ class AgentsMenu(cmd.Cmd):
sessionID = self.mainMenu.agents.get_agent_id(agent[3])
# max check in -> delay + delay*jitter
intervalMax = agent[4] + agent[4] * agent[5]
intervalMax = (agent[4] + agent[4] * agent[5])+30
# get the agent last check in time
agentTime = time.mktime(time.strptime(agent[16],"%Y-%m-%d %H:%M:%S"))
if agentTime < time.mktime(time.localtime()) - intervalMax:
# if the last checkin time exceeds the limit, remove it
displayAgents.append(agent)
@ -944,7 +943,7 @@ class AgentsMenu(cmd.Cmd):
sessionID = self.mainMenu.agents.get_agent_id(agent[3])
# max check in -> delay + delay*jitter
intervalMax = agent[4] + agent[4] * agent[5]
intervalMax = (agent[4] + agent[4] * agent[5])+30
# get the agent last check in time
agentTime = time.mktime(time.strptime(agent[16],"%Y-%m-%d %H:%M:%S"))