Skip to content
Snippets Groups Projects
Commit 7e9c1f3d authored by sguazt's avatar sguazt
Browse files

Core: small optimization (avoid looking for measure sinks if the configuration...

Core: small optimization (avoid looking for measure sinks if the configuration parameter is an empty string)
parent 8cd2f352
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ class MetaMonitor(ABC):
self._measures_sink_thread = None
measures_sinks = []
measures_sink_labels = conf.get_parameter('options', 'measures_sinks', return_type=str)
if measures_sink_labels is not None:
if measures_sink_labels:
for sink in measures_sink_labels.split(','):
measures_sink_params = conf.get_parameters('measures_sink.' + sink.strip())
if 'module' not in measures_sink_params or 'class' not in measures_sink_params:
......@@ -89,9 +89,9 @@ class MetaMonitor(ABC):
clazz = getattr(module, measures_sink_params['class'])
instance = clazz.from_conf(measures_sink_params)
measures_sinks.append(instance)
self._measures_sink_thread = threading.Thread(target=self._measures_sink_runner, args=(measures_sinks,))
##self._measures_sink_thread.setDaemon(True) #FIXME: is this really necessary? It seems that without it, the EasyCloud app blocks on exit
#self._measures_sink_thread.daemon = True #FIXME: is this really necessary? It seems that without it, the EasyCloud app blocks on exit
self._measures_sink_thread = threading.Thread(target=self._measures_sink_runner, args=(measures_sinks,))
##self._measures_sink_thread.setDaemon(True) #FIXME: is this really necessary? It seems that without it, the EasyCloud app blocks on exit
#self._measures_sink_thread.daemon = True #FIXME: is this really necessary? It seems that without it, the EasyCloud app blocks on exit
#[ALTERNATIVE #1]
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment