Exemple #1
0
 def run(self):
     # the mainloop.
     try:
         import ZServer
         import Lifetime
         Lifetime.loop()
         sys.exit(ZServer.exit_code)
     finally:
         self.shutdown()
Exemple #2
0
 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()
Exemple #3
0
 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()
Exemple #4
0
 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()
Exemple #5
0
 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()