def run(self): # the mainloop. try: import ZServer import Lifetime Lifetime.loop() sys.exit(ZServer.exit_code) finally: self.shutdown()
def run(self): # the mainloop. try: from App.config import getConfiguration config = getConfiguration() import ZServer import Lifetime Lifetime.loop() sys.exit(ZServer.exit_code) finally: self.shutdown()
def run(self): # the mainloop. try: from App.config import getConfiguration config = getConfiguration() # NOQA import Lifetime Lifetime.loop() from ZServer.Zope2.Startup.config import ZSERVER_EXIT_CODE sys.exit(ZSERVER_EXIT_CODE) finally: self.shutdown()
def run(self): # the mainloop. try: from App.config import getConfiguration config = getConfiguration() import ZServer if config.twisted_servers and config.servers: raise ZConfig.ConfigurationError( "You can't run both ZServer servers and twisted servers.") if config.twisted_servers: if not _use_twisted: raise ZConfig.ConfigurationError( "You do not have twisted installed.") twisted.internet.reactor.run() # Storing the exit code in the ZServer even for twisted, # but hey, it works... sys.exit(ZServer.exit_code) else: import Lifetime Lifetime.loop() sys.exit(ZServer.exit_code) finally: self.shutdown()