]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/mgr/prometheus: no need to wait for notify event
authorJan Fajerski <jfajerski@suse.com>
Thu, 10 Aug 2017 16:09:17 +0000 (18:09 +0200)
committerJohn Spray <john.spray@redhat.com>
Wed, 27 Sep 2017 18:18:00 +0000 (14:18 -0400)
If stats or perf counters are not available they won't be emitted.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
src/pybind/mgr/prometheus/module.py

index b9aae6c33e519d3e54f06231828eea9e089a231a..aeb464b1a486d4676b78fb05658db49aa7550766 100644 (file)
@@ -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,