From 1ef5c88ef08ab9950ee8d7d4acda032b5a54f2f5 Mon Sep 17 00:00:00 2001 From: Jan Fajerski Date: Thu, 10 Aug 2017 18:09:17 +0200 Subject: [PATCH] pybind/mgr/prometheus: no need to wait for notify event If stats or perf counters are not available they won't be emitted. Signed-off-by: Jan Fajerski (cherry picked from commit ead0973d7dd12fe985390891c80f1bc15f7b9aec) --- src/pybind/mgr/prometheus/module.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index b1230c7ab8579..27184497a39fe 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -327,10 +327,6 @@ class Module(MgrModule): return self.metrics def notify(self, ntype, nid): - ''' Just try to sync and not run until we're notified once ''' - if not self.notified: - self.serving = True - self.notified = True if ntype == 'perf_schema_update': daemon_type, daemon_id = nid.split('.') self._get_ordered_schema( @@ -366,9 +362,6 @@ class Module(MgrModule): "server_addr: %s server_port: %s" % (server_addr, server_port) ) - # wait for first notification (of any kind) to start up - # while not self.serving: - # time.sleep(1) cherrypy.config.update({ 'server.socket_host': server_addr, -- 2.39.5