当前位置: 首页>>代码示例>>Python>>正文


Python Application.stop方法代码示例

本文整理汇总了Python中application.Application.stop方法的典型用法代码示例。如果您正苦于以下问题:Python Application.stop方法的具体用法?Python Application.stop怎么用?Python Application.stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在application.Application的用法示例。


在下文中一共展示了Application.stop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: stop

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import stop [as 别名]
 def stop(self):
   """Stop the instance by pid. By the default
   the signal is 15."""
   Application.stop(self)
   if socketStatus(self.hostname, self.port):
     self._releaseOpenOfficePort()
   self._cleanRequest()
开发者ID:Seb182,项目名称:cloudooo,代码行数:9,代码来源:openoffice.py

示例2: main

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import stop [as 别名]
def main():
    optParser = OptionParser()
    optParser.add_option("-c", "--channel-id", type="int", dest="channelId")
    options, args = optParser.parse_args()
    channelId = options.channelId or 0

    #load server configs
    ServerConfigManager.loadConfig()

    # start logger
    logDirName = "log/gate"
    if channelId > 0:
        logDirName = "{}-{}".format(logDirName, channelId)

    loggerDir = os.path.join(os.getcwd(), logDirName)
    Logger.startLogging(loggerDir, ServerConfigManager.isDebug)

    Logger.logInfo("loading configs...")
    staticdata.dataloader.loadConfigs()

    Logger.logInfo("Loading ImageToken Configs...")
    ImageToken.loadConfig()

    Logger.logInfo("Loading SMS Configs...")
    SMSManager.loadConfig()

    Logger.logInfo("Init db connection")
    connConfig = os.path.join(parent_dir, "config/dbcache_connection_config.xml")
    tableConfig = os.path.join(parent_dir, "staticdata/dbconfig/main_db_config.xml")
    if not MongoDatabase.loadConfig(connConfig, tableConfig):
        Logger.logInfo("DbCache", "Load MongoDatata Config Failed")
        return

    app = Application("Gate", channelId)

    Logger.logInfo("initiating app...")
    if app.init():
        Logger.logInfo("starting mongodb")
        if not MongoDatabase.start():
            Logger.logInfo("Starting mongoDb Failed")
            return

        Logger.logInfo("starting scheduler...")
        Scheduler.start()

        # load everty thing
        loadEveryThing()

        # sys command load
        Logger.logInfo("starting system command loader...")
        SystemCommandLoder.start()

        Logger.logInfo("starting app...")
        app.start()
    else:
        raise Exception("Initiating Application Failed.")

    Logger.logInfo("stopping app...")
    app.stop()
开发者ID:bropony,项目名称:gamit,代码行数:61,代码来源:gate.py

示例3: main

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import stop [as 别名]
def main():
    #load server configs
    ServerConfigManager.loadConfig()

    # start logger
    loggerDir = os.path.join(os.getcwd(), "log/DbCache")
    Logger.startLogging(loggerDir, ServerConfigManager.isDebug)

    Logger.logInfo("loading configs...")
    if not staticdata.dataloader.loadConfigs():
        return

    Logger.logInfo("Init db connection")
    connConfig = os.path.join(parent_dir, "config/dbcache_connection_config.xml")
    tableConfig = os.path.join(parent_dir, "staticdata/dbconfig/main_db_config.xml")
    if not MongoDatabase.loadConfig(connConfig, tableConfig):
        Logger.logInfo("DbCache", "Load MongoDatata Config Failed")
        return

    app = Application("DbCache")

    Logger.logInfo("initiating app...")
    if app.init():
        Logger.logInfo("starting mongodb")
        if not MongoDatabase.start():
            Logger.logInfo("Starting mongoDb Failed")
            return

        # Logger.logInfo("starting scheduler...")
        # Scheduler.start()

        Logger.logInfo("starting system command loader...")
        SystemCommandLoder.start()

        Logger.logInfo("starting app...")
        app.start()
    else:
        raise Exception("Initiating Application Failed.")

    Logger.logInfo("stopping app...")
    app.stop()
开发者ID:bropony,项目名称:gamit,代码行数:43,代码来源:dbcache.py

示例4: main

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import stop [as 别名]
def main():
    ServerConfigManager.loadConfig()

    # start logger
    loggerDir = os.path.join(os.getcwd(), "log/test")
    Logger.startLogging(loggerDir, ServerConfigManager.isDebug)

    Logger.logInfo("loading configs...")
    staticdata.dataloader.loadConfigs()

    app = Application()

    Logger.logInfo("initiating app...")
    if app.init():
        Logger.logInfo("starting app...")
        app.start()
    else:
        raise Exception("Initiating Application Failed.")

    Logger.logInfo("stopping app...")
    app.stop()
开发者ID:bropony,项目名称:gamit,代码行数:23,代码来源:client_test.py

示例5: main

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import stop [as 别名]
def main():
    optParser = OptionParser()
    optParser.add_option("-c", "--channel-id", type="int", dest="channelId")
    options, args = optParser.parse_args()
    channelId = options.channelId or 0

    #load server configs
    ServerConfigManager.loadConfig()

    # start logger
    logDirName = "log/servicegate"
    if channelId > 0:
        logDirName = "{}-{}".format(logDirName, channelId)

    loggerDir = os.path.join(os.getcwd(), logDirName)
    Logger.startLogging(loggerDir, ServerConfigManager.isDebug)

    Logger.logInfo("loading configs...")
    staticdata.dataloader.loadConfigs()

    Logger.logInfo("Loading ImageToken Configs...")
    ImageToken.loadConfig()

    Logger.logInfo("Loading SMS Configs...")
    SMSManager.loadConfig()

    app = Application("Gate", channelId)

    Logger.logInfo("initiating app...")
    if app.init():
        Logger.logInfo("starting scheduler...")
        Scheduler.start()

        Logger.logInfo("starting app...")
        app.start()
    else:
        raise Exception("Initiating Application Failed.")

    Logger.logInfo("stopping app...")
    app.stop()
开发者ID:bropony,项目名称:gamit,代码行数:42,代码来源:servicegate.py

示例6: app_stop

# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import stop [as 别名]
def app_stop(name, namespace):
    app = Application(name, namespace=namespace)
    app.stop()
开发者ID:jianghaishanyue,项目名称:alauda-CLI,代码行数:5,代码来源:commands.py


注:本文中的application.Application.stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。