예제 #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()
예제 #2
0
파일: api.py 프로젝트: xorock/ajenti-v
    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()
예제 #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()
예제 #4
0
파일: api.py 프로젝트: xorock/ajenti-v
    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()
예제 #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()
예제 #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()
예제 #7
0
 def restart_services(self):
     profile_start('V: restarting services')
     self.__runall([(r.process, []) for r in self.restartables])
     profile_end()
예제 #8
0
파일: api.py 프로젝트: xorock/ajenti-v
 def restart_services(self):
     profile_start('V: restarting services')
     self.__runall([(r.process, []) for r in self.restartables])
     profile_end()
예제 #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()