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

monitoring : fix performance problems in MAE and hbase-consumer

parent ec78ba0c
Branches
Tags
No related merge requests found
......@@ -128,8 +128,8 @@ def main():
time.sleep(0.1)
try:
# purge old messages
message_queue.purge(maxtemp=config_dic['message_max_temp'],
maxlock=config_dic['message_max_temp'])
message_queue.purge(maxtemp=0,
maxlock=0)
except OSError, exc:
logging.debug(str(exc))
......
......@@ -44,10 +44,13 @@ class Analyzer(threading.Thread):
msg = self._message_queue.get_message(name)
for m in self._parse(msg):
self._apply(m)
self._message_queue.remove(name)
try:
self._message_queue.remove(name)
except OSError, exc:
logging.warning(str(exc))
time.sleep(0.1) # wait and loop again if empty queue
# purge old messages
self._message_queue.purge(maxtemp=600, maxlock=600)
self._message_queue.purge(maxtemp=0, maxlock=0)
except OSError, exc:
logging.debug(str(exc))
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment