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


Python NativeProcessSession.onConnect方法代码示例

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


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

示例1: onConnect

# 需要导入模块: from crossbar.common.process import NativeProcessSession [as 别名]
# 或者: from crossbar.common.process.NativeProcessSession import onConnect [as 别名]
    def onConnect(self):
        """
        Called when the worker has connected to the node's management router.
        """
        self._node_id = self.config.extra.node
        self._worker_id = self.config.extra.worker
        self._uri_prefix = u'crossbar.worker.{}'.format(self._worker_id)

        NativeProcessSession.onConnect(self, False)

        self._module_tracker = TrackingModuleReloader(snapshot=False)

        self._profiles = {}

        # flag indicating when worker is shutting down
        self._is_shutting_down = False

        # Jinja2 templates for Web (like WS status page et al)
        #
        templates_dir = os.path.abspath(pkg_resources.resource_filename("crossbar", "web/templates"))
        self.log.debug("Using Web templates from {templates_dir}",
                       templates_dir=templates_dir)
        self._templates = jinja2.Environment(loader=jinja2.FileSystemLoader(templates_dir))

        self.join(self.config.realm)
开发者ID:dardok,项目名称:crossbar,代码行数:27,代码来源:worker.py

示例2: onConnect

# 需要导入模块: from crossbar.common.process import NativeProcessSession [as 别名]
# 或者: from crossbar.common.process.NativeProcessSession import onConnect [as 别名]
    def onConnect(self):
        # self._uri_prefix = 'crossbar.node.{}'.format(self.config.extra.node)
        self._uri_prefix = 'crossbar.node.{}'.format(self._node_id)

        NativeProcessSession.onConnect(self, False)

        # self.join(self.config.realm)
        self.join(self._realm)
开发者ID:biddyweb,项目名称:crossbar,代码行数:10,代码来源:process.py

示例3: onConnect

# 需要导入模块: from crossbar.common.process import NativeProcessSession [as 别名]
# 或者: from crossbar.common.process.NativeProcessSession import onConnect [as 别名]
    def onConnect(self):

        self.log.debug("Connected to node management router")

        NativeProcessSession.onConnect(self, False)

        # self.join(self.config.realm)
        self.join(self._realm)
开发者ID:NinjaMSP,项目名称:crossbar,代码行数:10,代码来源:process.py

示例4: onConnect

# 需要导入模块: from crossbar.common.process import NativeProcessSession [as 别名]
# 或者: from crossbar.common.process.NativeProcessSession import onConnect [as 别名]
    def onConnect(self):

        self.log.debug("Connected to node management router")

        # self._uri_prefix = u'crossbar.node.{}'.format(self.config.extra.node)
        self._uri_prefix = u'crossbar.node.{}'.format(self._node_id)

        NativeProcessSession.onConnect(self, False)

        # self.join(self.config.realm)
        self.join(self._realm)
开发者ID:v09-software,项目名称:crossbar,代码行数:13,代码来源:process.py

示例5: onConnect

# 需要导入模块: from crossbar.common.process import NativeProcessSession [as 别名]
# 或者: from crossbar.common.process.NativeProcessSession import onConnect [as 别名]
    def onConnect(self):
        """
        Called when the worker has connected to the node's management router.
        """
        self._uri_prefix = 'crossbar.node.{}.worker.{}'.format(self.config.extra.node, self.config.extra.worker)

        NativeProcessSession.onConnect(self, False)

        self._module_tracker = TrackingModuleReloader(debug=True)

        self.join(self.config.realm)
开发者ID:Tsunami2069,项目名称:crossbar,代码行数:13,代码来源:worker.py

示例6: onConnect

# 需要导入模块: from crossbar.common.process import NativeProcessSession [as 别名]
# 或者: from crossbar.common.process.NativeProcessSession import onConnect [as 别名]
    def onConnect(self):
        """
        Called when the worker has connected to the node's management router.
        """
        self._uri_prefix = 'crossbar.node.{}.worker.{}'.format(self.config.extra.node, self.config.extra.worker)

        NativeProcessSession.onConnect(self, False)

        self._module_tracker = TrackingModuleReloader(debug=True)

        self._profiles = {}

        # Jinja2 templates for Web (like WS status page et al)
        #
        templates_dir = os.path.abspath(pkg_resources.resource_filename("crossbar", "web/templates"))
        self.log.debug("Using Web templates from {templates_dir}",
                       templates_dir=templates_dir)
        self._templates = jinja2.Environment(loader=jinja2.FileSystemLoader(templates_dir))

        self.join(self.config.realm)
开发者ID:v09-software,项目名称:crossbar,代码行数:22,代码来源:worker.py


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