コード例 #1
0
ファイル: __init__.py プロジェクト: wpjunior/proled
 def run(self):
     # the mainloop.
     try:
         import ZServer
         import Lifetime
         Lifetime.loop()
         sys.exit(ZServer.exit_code)
     finally:
         self.shutdown()
コード例 #2
0
ファイル: __init__.py プロジェクト: c0ns0le/zenoss-4
 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()
コード例 #3
0
ファイル: starter.py プロジェクト: yuseitahara/ZServer
 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()
コード例 #4
0
ファイル: starter.py プロジェクト: zopefoundation/ZServer
 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()
コード例 #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()