Example #1
0
    def update_configuration(self):
        profile_start('V: creating configuration')
        self.__runall([(c.create_configuration, [self.config]) for c in self.components])
        self.webserver.create_configuration(self.config)
        profile_end()

        profile_start('V: applying configuration')
        self.__runall([(c.apply_configuration, []) for c in self.components])
        self.webserver.apply_configuration()
        profile_end()
Example #2
0
    def update_configuration(self):
        profile_start('V: creating configuration')
        self.__runall([(c.create_configuration, [self.config])
                       for c in self.components])
        self.webserver.create_configuration(self.config)
        profile_end()

        profile_start('V: applying configuration')
        self.__runall([(c.apply_configuration, []) for c in self.components])
        self.webserver.apply_configuration()
        profile_end()
Example #3
0
    def run_checks(self):
        self.checks = []
        for c in self.components:
            self.checks += c.get_checks()
        self.checks += self.webserver.get_checks()

        profile_start('V: running checks')

        def run_check(c):
            c.satisfied = c.check()

        self.__runall([(run_check, [c]) for c in self.checks])
        profile_end()
Example #4
0
    def run_checks(self):
        self.checks = []
        for c in self.components:
            self.checks += c.get_checks()
        self.checks += self.webserver.get_checks()

        profile_start('V: running checks')

        def run_check(c):
            c.satisfied = c.check()

        self.__runall([(run_check, [c]) for c in self.checks])
        profile_end()
Example #5
0
    def update_configuration(self):
        profile_start('V: creating configuration')
        greenlets = [gevent.spawn(c.create_configuration, self.config) for c in self.components]
        gevent.joinall(greenlets)
        self.__handle_exceptions(greenlets)
        self.webserver.create_configuration(self.config)
        profile_end()

        profile_start('V: applying configuration')
        greenlets = [gevent.spawn(c.apply_configuration) for c in self.components]
        gevent.joinall(greenlets)
        self.__handle_exceptions(greenlets)
        self.webserver.apply_configuration()
        profile_end()
Example #6
0
    def run_checks(self):
        self.checks = []
        for c in self.components:
            self.checks += c.get_checks()
        self.checks += self.webserver.get_checks()

        profile_start('V: running checks')

        def run_check(c):
            c.satisfied = c.check()

        greenlets = [gevent.spawn(run_check, c) for c in self.checks]
        gevent.joinall(greenlets)
        self.__handle_exceptions(greenlets)
        profile_end()
Example #7
0
 def restart_services(self):
     profile_start('V: restarting services')
     self.__runall([(r.process, []) for r in self.restartables])
     profile_end()
Example #8
0
 def restart_services(self):
     profile_start('V: restarting services')
     self.__runall([(r.process, []) for r in self.restartables])
     profile_end()
Example #9
0
 def restart_services(self):
     profile_start('V: restarting services')
     greenlets = [gevent.spawn(r.process) for r in self.restartables]
     gevent.joinall(greenlets)
     self.__handle_exceptions(greenlets)
     profile_end()