Esempio n. 1
0
    def reload(self, server_name):
        """
        Reload the server

        This actually creates a new server object, so that if the load fails it will continue to
        process requests with the old server instance.
        """

        log.debug("reloading '%s'", server_name)

        server = self.servers[server_name]
        try:
            new_server = Server(server.settings_path)
            new_server.build()
        except:
            log.exception("reload of '%s' failed", server_name)
        else:
            self.servers[server_name] = new_server
            self.sites.clear()
            for server in itervalues(self.servers):
                self.sites.add(server.domains, name=server.name)
Esempio n. 2
0
    def reload(self, server_name):
        """
        Reload the server

        This actually creates a new server object, so that if the load fails it will continue to
        process requests with the old server instance.
        """

        log.debug("reloading '%s'", server_name)

        server = self.servers[server_name]
        try:
            new_server = Server(server.settings_path)
            new_server.build()
        except:
            log.exception("reload of '%s' failed", server_name)
        else:
            self.servers[server_name] = new_server
            self.sites.clear()
            for server in itervalues(self.servers):
                self.sites.add(server.domains, name=server.name)
Esempio n. 3
0
 def all_fields(self):
     for field_list in itervalues(self._fields):
         for field in field_list:
             yield field
Esempio n. 4
0
 def fields(self):
     return [field_list[0] for field_list in itervalues(self._fields)]
Esempio n. 5
0
 def build_all(self):
     for server in itervalues(self.servers):
         server.build()
Esempio n. 6
0
 def build_all(self):
     for server in itervalues(self.servers):
         server.build()
Esempio n. 7
0
 def all_fields(self):
     for field_list in itervalues(self._fields):
         for field in field_list:
             yield field
Esempio n. 8
0
 def fields(self):
     return [field_list[0] for field_list in itervalues(self._fields)]