• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python vertx.deploy_verticle函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中vertx.deploy_verticle函数的典型用法代码示例。如果您正苦于以下问题:Python deploy_verticle函数的具体用法?Python deploy_verticle怎么用?Python deploy_verticle使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: test_deploy

 def test_deploy(self):
     global handler_id
     def handler(message):
         if message.body == "started":
             tu.test_complete()
     handler_id = EventBus.register_handler("test-handler", False, handler)
     conf = {'foo' : 'bar'}
     vertx.deploy_verticle("core/deploy/child.py", conf)
开发者ID:emangchi,项目名称:vert.x,代码行数:8,代码来源:test_client.py


示例2: deployit

def deployit(count):
    def handler(err, deploy_id):
        print "deployed ", count
        if deploy_id is not None:
            undeployit(deploy_id, count)
    #child_name = 'child%d.py' % count
    print "deploying ", count
    vertx.deploy_verticle("child.py", handler=handler)
开发者ID:Ed42,项目名称:vertx-examples,代码行数:8,代码来源:mem.py


示例3: test_deploy_fail

    def test_deploy_fail(self):

        def deploy_handler(err, id):
            tu.azzert(err is not None)
            tu.azzert(id is None)
            tu.test_complete()

        vertx.deploy_verticle("core/deploy/notexists.py", handler=deploy_handler)
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:8,代码来源:test_client.py


示例4: test_deploy

    def test_deploy(self):

        def handler(message):
            if message.body == "started":
                tu.test_complete()
        EventBus.register_handler("test-handler", False, handler)
        conf = {'foo' : 'bar'}
        def deploy_handler(err, ok):
            tu.azzert(err == None)

        vertx.deploy_verticle("core/deploy/child.py", conf, 1, deploy_handler)
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:11,代码来源:test_client.py


示例5: test_deploy2

    def test_deploy2(self):

        def deploy_handler(err, id):

            tu.azzert(err is None)
            tu.azzert(id is not None)

            def undeploy_handler(err):
                tu.azzert(err is None)
                tu.test_complete()

            vertx.undeploy_verticle(id, handler=undeploy_handler)

        vertx.deploy_verticle("core/deploy/child2.py", handler=deploy_handler)
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:14,代码来源:test_client.py


示例6: deploy_mongo

def deploy_mongo(err, dep_id):
    if err is not None:
        err.printStackTrace()
    else:
        def static_handler(err,dep_id):
            if err: logger.info(err.printStackTrace())
            else: 
                logger.info("MOD-STATIC-DATA-OK")
        logger.info("STATIC-DATA-START-DEPLOY")
        if (global_config.get("name") == "PRODUCTION"):
            logger.info("PRODUCTION ENVIROMENT")
            vertx.deploy_verticle('server/utils/prod_static_data.py', handler=static_handler)
        elif (global_config.get("name") == "TEST"):
            logger.info("TEST ENVIROMENT")
            vertx.deploy_verticle('server/utils/test_static_data.py', handler=static_handler)
        logger.info("MOD-MONGO-OK uid: %s"% dep_id)
开发者ID:jakubjosef,项目名称:Vert.x-File-Hosting,代码行数:16,代码来源:main.py


示例7: test_undeploy

    def test_undeploy(self):
        print "in test undeploy"
        def handler(message):
            return

        EventBus.register_handler("test-handler", False, handler)

        conf = {'foo' : 'bar'}

        def undeploy_handler(err):
            tu.azzert(err == None)
            tu.test_complete()

        def deploy_handler(err, id):
            tu.azzert(err == None)
            vertx.undeploy_verticle(id, handler=undeploy_handler)

        vertx.deploy_verticle("core/deploy/child.py", conf, handler=deploy_handler)
开发者ID:fregaham,项目名称:mod-lang-jython,代码行数:18,代码来源:test_client.py


示例8: deploy_mailer

    else:
        logger.info("MOD-AUTH-MGR uid: %s" %dep_id)
def deploy_mailer(err, dep_id):
    if err is not None:
        err.printStackTrace()
    else:
        logger.info("MOD-MAILER uid: %s" %dep_id)


#vertx.deploy_module('io.vertx~mod-unzip~1.0.0-final', {"address":"unzip.module"}, 1,handler=deploy_handler)

#main server / route matcher / eventbus
logger.info("WEB-SERVER-START-DEPLOY")
logger.info("MOD-MONGO-START-DEPLOY")
logger.info("MOD-AUTH-MGR-START-DEPLOY")
logger.info("MOD-MAILER-START-DEPLOY")

vertx.deploy_module('io.vertx~mod-mongo-persistor~2.0.0-final', global_config.get("mongodb"), 1,handler=deploy_mongo)
vertx.deploy_module('io.vertx~mod-auth-mgr~2.0.0-final', None, 1,handler=deploy_auth)
vertx.deploy_module('io.vertx~mod-mailer~2.0.0-final', global_config.get("mailer"), 1,handler=deploy_mailer)
vertx.deploy_verticle('server/web_server.py', global_config, 1, handler=web_server_deploy)
vertx.deploy_verticle('server/sock_js_server.py', global_config, 1, handler=sock_js_server_deploy)
vertx.deploy_verticle('server/presenation_server.py', global_config, 1, handler=sock_js_server_deploy)

#logger.info("load config : %s"% config)
#logger.info("webserver config : %s"% config.main)
#logger.info("mongopersistor config: %s"% config.mongo)
#logger.info("webserver config: %s"% auth_config)
#cleaner.periodic_cleaner(5000,"files/temp/",".*\.uploaded")
#cleaner.periodic_cleaner(15000,"files/symlink/")
开发者ID:jakubjosef,项目名称:Vert.x-File-Hosting,代码行数:30,代码来源:main.py


示例9: test_deploy_arbitrary_verticle

def test_deploy_arbitrary_verticle():
    vertx.deploy_verticle('org.lima.vertx.was.integration.java.SomeVerticle')
开发者ID:sungtaek,项目名称:mod-was,代码行数:2,代码来源:basic_integration_test.py


示例10: test_assert_failed_from_verticle

def test_assert_failed_from_verticle():
    conf = {'type' : 'assert_fail'}
    vertx.deploy_verticle('test_verticle.py', conf)
开发者ID:vert-x,项目名称:test-tools-tests,代码行数:3,代码来源:assertion_failed_integration_test.py


示例11: log_event

"""
Startet die App

@author Markus Tacker <[email protected]>
"""

import vertx
from core.event_bus import EventBus

def log_event(message):
    print ">> %s" % message.body

EventBus.register_handler('log.event', False, log_event)

config = vertx.config()

vertx.deploy_verticle("fetchcurators.py", config)
vertx.deploy_verticle("fetchfavorites.py", config)
vertx.deploy_verticle("fetchfriends.py", config)
vertx.deploy_verticle("fetchfavorites.py", config)
vertx.deploy_verticle("createfavorite.py", config)
vertx.deploy_verticle("createretweet.py", config)
vertx.deploy_verticle("publishretweets.py", config)
开发者ID:Gruenderhub,项目名称:twitter-autocurator,代码行数:23,代码来源:app.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python vertx.set_timer函数代码示例发布时间:2022-05-26
下一篇:
Python vertx.create_http_server函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap