incorrect setting of known
@@ -213,6 +213,12 @@ class Update_Switch_State(Monitor_Helper_Base):
if self.first_time:
self.first_time = False
# TODO db call to see if really need to run things
+ # TODO needs work
+ #if self.r and self.r.exists(h):
+ # self.poseidon_logger.info(
+ # 'adding address to known systems {0}'.format(machine))
+ # end_point = EndPoint(machine, state='KNOWN')
+ # self.endpoints.set(end_point)
for machine in machines:
end_point = EndPoint(machine, state='KNOWN')
self.poseidon_logger.info(
@@ -223,12 +229,6 @@ class Update_Switch_State(Monitor_Helper_Base):
for machine in machines:
end_point = EndPoint(machine, state='UNKNOWN')
h = end_point.make_hash()
- if self.r and self.r.exists(h):
- self.poseidon_logger.info(
- 'adding address to known systems {0}'.format(machine))
- end_point = EndPoint(machine, state='KNOWN')
- self.endpoints.set(end_point)
- else:
ep = None
if h in self.endpoints.state:
ep = self.endpoints.state[h]
