Skip to content

Commit

Permalink
managed controller exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
JosepSampe committed Oct 28, 2017
1 parent dd039ea commit ea7b8d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/controllers/actors/abstract_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def stop_actor(self):
metric_actor.detach(self.id, self.get_target())
if self.consumer:
self.consumer.stop_consuming()
except NotFoundError as e:
logger.error(e)
except:
pass
self.host.stop_actor(self.id)

def compute_data(self, metric_data):
Expand Down
5 changes: 3 additions & 2 deletions api/controllers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ def start_controller_instance(instance_id, controller_name, controller_class_nam
controller_actors[instance_id].run()
logger.info("Controller, Started controller actor: "+controller_location)
except Exception as e:
logger.error(str(e))
controller_actors[instance_id].stop_actor()
del controller_actors[instance_id]
raise e


Expand All @@ -301,5 +302,5 @@ def stop_controller_instance(instance_id):
del controller_actors[instance_id]
logger.info("Controller, Stopped controller actor: " + str(instance_id))
except Exception as e:
logger.error(str(e))
del controller_actors[instance_id]
raise e

0 comments on commit ea7b8d3

Please sign in to comment.