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


Python ReconnectingClientFactory.clientConnectionFailed方法代码示例

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


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

示例1: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionFailed(self, connector, reason):
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
     log.clients(
         "%s::clientConnectionFailed (%s:%d) %s" % (self, connector.host, connector.port, reason.getErrorMessage())
     )
     self.connectFailed.callback(dict(connector=connector, reason=reason))
     self.connectFailed = Deferred()
开发者ID:Cue,项目名称:graphite,代码行数:9,代码来源:client.py

示例2: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
	def clientConnectionFailed(self, connector, reason):
		"""
		Notify the pool that we're unable to connect
		"""
		if self.protocolInstance is not None:
			if self.protocolInstance._lastreq and ((time() - self.protocolInstance._lastreq) >= 100):
				self.stopTrying()

		if self.continueTrying:
			ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)

			# pool pendings
			self.pool.addPendings(self)
		else:
			if DEBUG:
				log.msg('Sphinx factory stop', self)

			if self.deferred:
				self.deferred.errback(reason)

				# Clean deferred
				self.deferred = None
			else:
				# pool pendings
				self.pool.delPendings(self)

		if self.protocolInstance is not None:
			self.pool.clientGone(self.protocolInstance)

		# Clean
		self.protocolInstance = None
开发者ID:p0is0n,项目名称:txsphinx,代码行数:33,代码来源:client.py

示例3: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
	def clientConnectionFailed(self, connector, reason):
		global ncidsrv
		if config.plugins.NcidClient.connectionVerbose.value:
			Notifications.AddNotification(MessageBox, _("Connecting to NCID Server failed\n (%s)\nretrying...") % reason.getErrorMessage(), type=MessageBox.TYPE_INFO, timeout=config.plugins.NcidClient.timeout.value)
		ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
		# config.plugins.NcidClient.enable.value = False
		ncidsrv = None
开发者ID:OpenVuPlus,项目名称:dvbapp-plugin,代码行数:9,代码来源:plugin.py

示例4: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionFailed(self, connector, reason):
     log.info(
         "Connection to %s failed; will retry in %d second%s"
         % (connector.getDestination(), self.delay, "" if self.delay == 1 else "s"),
         system="VOEventSubscriberFactory",
     )
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
开发者ID:jdswinbank,项目名称:Comet,代码行数:9,代码来源:subscriber.py

示例5: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
    def clientConnectionFailed(self, connector, reason):

        self.logger.warn('CmdrConnection failed: %s ' % (reason))

        self.activeConnection = None
        self.stateCallback(self)
        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
开发者ID:Subaru-PFS,项目名称:tron_actorcore,代码行数:9,代码来源:CmdrConnection.py

示例6: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
	def clientConnectionFailed(self, connector, reason):
		"""
		ParaConnFactory.clientConnectionFailed: function that is called when the 
		connectTCP fails to reach the host. Taken from the internet, this function 
		will periodically attempt to connect until the connection is successful.
		"""
		ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
开发者ID:timzchang,项目名称:Parachutes,代码行数:9,代码来源:dropper.py

示例7: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionFailed(self, connector, reason):
     """Connection failed
     """
     print 'Connection failed. Reason:', reason
     ReconnectingClientFactory.clientConnectionFailed(self,
                                                      connector,
                                                      reason)
开发者ID:m-messiah,项目名称:ROT,代码行数:9,代码来源:chat.py

示例8: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
    def clientConnectionFailed(self, connector, reason):
        """ *******************************************************
        Called when a connection has failed to connect

        @type reason: L{twisted.python.fialure.Failure}
        ******************************************************* """
        print 'Connection fialed. Reason:', reason
        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
开发者ID:frellwan,项目名称:SciFy-Pi,代码行数:10,代码来源:ftpclient.py

示例9: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionFailed(self, connector, reason):
     log.msg("Connection failed. Reason: %s" % reason, logLevel=INFO)
     if getattr(self, "restart", True):
         self.reset_protocol_for_login()
         ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
     else:
         log.msg("Done - no restart", logLevel=INFO)
         reactor.callWhenRunning(reactor.stop)
开发者ID:Watzmann,项目名称:TGSBot,代码行数:10,代码来源:tgsClient.py

示例10: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
    def clientConnectionFailed(self, connector, reason):
        """
        self.CONNECTION_INFO ok
        """
        self.continueTrying = None

        log.msg('Connection failed. Reason: ', reason)
        ReconnectingClientFactory.clientConnectionFailed(self,\
         connector, reason)
开发者ID:satnet-project,项目名称:uvigo-client,代码行数:11,代码来源:client_amp.py

示例11: clientConnectionLost

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionLost(self, connector, reason):
     log.info(
         "Connection to %s lost; will retry in %d second%s" %
         (connector.getDestination(), self.delay, "" if self.delay == 1 else "s"),
         system="VOEventSubscriberFactory"
     )
     if self.reset_call.active():
         self.reset_call.cancel()
     ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
开发者ID:timstaley,项目名称:Comet,代码行数:11,代码来源:subscriber.py

示例12: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionFailed(self, connector, reason):
     logging.debug('Connection failed to Envisalink. Reason: %s', str(reason))
     if hasattr(self, "_currentLoopingCall"):
         try:
             self._currentLoopingCall.stop()
         except:
             logging.error("Error trying to stop looping call, ignoring...")
     ReconnectingClientFactory.clientConnectionFailed(self, connector,
                                                      reason)
开发者ID:lgleasain,项目名称:HoneyAlarmServer,代码行数:11,代码来源:alarmserver.py

示例13: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
 def clientConnectionFailed(self, connector, reason):
     self._failures += 1
     dprint('connection failed ({}): {}'.format(
         self._failures, reason. getErrorMessage()))
     
     if self._listen or self._failures < 4:
         ReconnectingClientFactory.clientConnectionFailed(
             self, connector, reason)
     else:
         self.reactor.stop()
开发者ID:shrick,项目名称:ncidmon,代码行数:12,代码来源:client.py

示例14: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
    def clientConnectionFailed(self, connector, reason):
        # Warn on first failure
        if self.first_time == True:
            Speaker.speak("no_server")
            self.first_time = False

        # Retry
        self.resetDelay()
        log.err("Connection failed. Reason:", reason.getErrorMessage())
        ReconnectingClientFactory.clientConnectionFailed(self, connector, reason)
开发者ID:ant1fr,项目名称:LISA-CLIENT-Linux,代码行数:12,代码来源:service.py

示例15: clientConnectionFailed

# 需要导入模块: from twisted.internet.protocol import ReconnectingClientFactory [as 别名]
# 或者: from twisted.internet.protocol.ReconnectingClientFactory import clientConnectionFailed [as 别名]
    def clientConnectionFailed(self, connector, reason):
        """
        Notify the connectionPool that we're unable to connect
        """
        if self._protocolInstance is not None:
            self.connectionPool.clientBusy(self._protocolInstance)

        ReconnectingClientFactory.clientConnectionFailed(
            self,
            connector,
            reason)
开发者ID:rlotun,项目名称:txconnpool,代码行数:13,代码来源:pool.py


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