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)
def all_fields(self): for field_list in itervalues(self._fields): for field in field_list: yield field
def fields(self): return [field_list[0] for field_list in itervalues(self._fields)]
def build_all(self): for server in itervalues(self.servers): server.build()