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


Python BaseConnection.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
    def __init__(self, parameters=None, on_open_callback=None,
                 reconnection_strategy=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
开发者ID:arbeit,项目名称:openquake-packages,代码行数:11,代码来源:tornado_connection.py

示例2: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
    def __init__(self, parameters=None, on_open_callback=None,
                 reconnection_strategy=None, io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        # Store the passed in io_loop (for example, for unit tests)
        self.tornado_loop = io_loop

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
开发者ID:kaze,项目名称:paasmaker,代码行数:14,代码来源:tornado_connection.py

示例3: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
    def __init__(self, parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None,
                 callback_interval=250,
                 io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        self.callback_interval = callback_interval
        self._pc = None
        self._default_ioloop = io_loop or IOLoop.instance()

        BaseConnection.__init__(self, parameters, on_open_callback,
                                reconnection_strategy)
开发者ID:KnightBaron,项目名称:pika,代码行数:18,代码来源:tornado_connection.py

示例4: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
    def __init__(self, parameters=None,
                 on_open_callback=None,
                 reconnection_strategy=None,
                 callback_interval=250,
                 io_loop=None):

        # Validate we have Tornado installed
        if not IOLoop:
            raise ImportError("Tornado not installed")

        self.callback_interval = callback_interval
        self._pc = None
        self._default_ioloop = io_loop or IOLoop.instance()

        on_open_callback = stack_context.wrap(on_open_callback)
        
        with stack_context.StackContext(self._stack_context):
            BaseConnection.__init__(self, parameters, on_open_callback,
                                    reconnection_strategy, CallbackManager())
开发者ID:bergundy,项目名称:pika,代码行数:21,代码来源:tornado_connection.py

示例5: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
 def __init__(self, parameters):
     self.ready = defer.Deferred()
     BaseConnection.__init__(self, parameters, self.connectionReady)
     self.ioloop = IOLoopReactorAdapter(self, reactor)
开发者ID:bartekgorny,项目名称:pika,代码行数:6,代码来源:twisted_connection.py

示例6: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
 def __init__(self, parameters=None, on_open_callback=None,
              reconnection_strategy=None):
     # Run our base connection init
     BaseConnection.__init__(self, parameters, on_open_callback,
                             reconnection_strategy)
开发者ID:CashStar,项目名称:pika,代码行数:7,代码来源:select_connection.py

示例7: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
    def __init__(self, parameters=None, on_open_callback=None, reconnection_strategy=None):
        # Setup the IOLoop
        self.ioloop = IOLoop.instance()

        # Run our base connection init
        BaseConnection.__init__(self, parameters, on_open_callback, reconnection_strategy)
开发者ID:samuel,项目名称:pika,代码行数:8,代码来源:select_connection.py

示例8: __init__

# 需要导入模块: from pika.adapters.base_connection import BaseConnection [as 别名]
# 或者: from pika.adapters.base_connection.BaseConnection import __init__ [as 别名]
 def __init__(self, parameters):
     self.ready = defer.Deferred()
     BaseConnection.__init__(self, parameters, self.connectionReady)
开发者ID:nkvoll,项目名称:pika,代码行数:5,代码来源:twisted_connection.py


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