Skip to content
Snippets Groups Projects
Commit f47ce8cc authored by Benjamin Fiorini's avatar Benjamin Fiorini
Browse files

mae : handle uncaught exception and add initialisation

parent 0d44de9d
Branches
Tags
No related merge requests found
......@@ -105,6 +105,8 @@ def main():
sys.exit(1)
else :
cockpit_enabled = False
cockpit_buffer_lock = None
cockpit_buffer = None
# Set config variables
metrics_path = conf['metrics_path']
......
......@@ -7,6 +7,7 @@ import time
from messaging.message import Message
from messaging.queue.dqs import DQS
from messaging.error import MessageError
import MetricsAnalysisEngine
......@@ -41,7 +42,12 @@ class Analyzer(threading.Thread):
if self.STOP_FLAG.isSet():
return
if self._message_queue.lock(name):
msg = self._message_queue.get_message(name)
try:
msg = self._message_queue.get_message(name)
except MessageError, exc:
self._message_queue.remove(name)
logging.warning("Analyzer : " + str(exc))
continue
for m in self._parse(msg):
self._apply(m)
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment