reinvestigate if no results from ML
@@ -216,7 +216,6 @@ def rabbit_callback(ch, method, properties, body, q=None):
''' callback, places rabbit data into internal queue'''
Logger.poseidon_logger.debug('got a message: {0}:{1}:{2}'.format(
method.routing_key, body, type(body)))
- # TODO more
if q is not None:
q.put((method.routing_key, body))
else:
@@ -417,7 +416,6 @@ class Monitor(object):
# }
# }
#
- # TODO is this the best place for this?
if ml_returns[my_hash]['valid']:
current_state = endpoint.state
ml_decision = ml_returns[my_hash]['decisions']['behavior']
@@ -445,6 +443,11 @@ class Monitor(object):
my_hash, 'SHUTDOWN')
self.poseidon_logger.debug(
'MIRRORING Making SHUTDOWN')
+ else:
+ self.uss.endpoints.change_endpoint_nextstate(
+ my_hash, 'REINVESTIGATING')
+ self.poseidon_logger.debug(
+ 'ML results failed, reinvestigating')
def start_vent_collector(self, dev_hash, num_captures=1):
'''
