示例#1
0
 def gotPerspective(self, perspective):
     ReconnectingPBClientFactory.gotPerspective(self, perspective)
     self.perspective = perspective
     try:
         perspective.broker.transport.setTcpKeepAlive(1)
     except:
         log.msg("unable to set SO_KEEPALIVE")
         if not self.keepaliveInterval:
             self.keepaliveInterval = 10 * 60
     self.activity()
     if self.keepaliveInterval:
         log.msg("sending application-level keepalives every %d seconds" % self.keepaliveInterval)
         self.startTimers()
示例#2
0
 def gotPerspective(self, perspective):
     ReconnectingPBClientFactory.gotPerspective(self, perspective)
     self.perspective = perspective
     try:
         perspective.broker.transport.setTcpKeepAlive(1)
     except:
         log.msg("unable to set SO_KEEPALIVE")
         if not self.keepaliveInterval:
             self.keepaliveInterval = 10*60
     self.activity()
     if self.keepaliveInterval:
         log.msg("sending application-level keepalives every %d seconds" \
                 % self.keepaliveInterval)
         self.startTimers()
示例#3
0
 def gotPerspective(self, perspective):
     log.msg("connected to FreshCVS daemon")
     ReconnectingPBClientFactory.gotPerspective(self, perspective)
     self.source.connected = True
     # TODO: freshcvs-1.0.10 doesn't handle setFilter correctly, it will
     # be fixed in the upcoming 1.0.11 . I haven't been able to test it
     # to make sure the failure mode is survivable, so I'll just leave
     # this out for now.
     return
     if self.source.prefix is not None:
         pathfilter = "^%s" % self.source.prefix
         d = perspective.callRemote("setFilter", None, pathfilter, None)
         # ignore failures, setFilter didn't work in 1.0.10 and this is
         # just an optimization anyway
         d.addErrback(lambda f: None)
示例#4
0
 def gotPerspective(self, perspective):
     log.msg("connected to FreshCVS daemon")
     ReconnectingPBClientFactory.gotPerspective(self, perspective)
     self.source.connected = True
     # TODO: freshcvs-1.0.10 doesn't handle setFilter correctly, it will
     # be fixed in the upcoming 1.0.11 . I haven't been able to test it
     # to make sure the failure mode is survivable, so I'll just leave
     # this out for now.
     return
     if self.source.prefix is not None:
         pathfilter = "^%s" % self.source.prefix
         d = perspective.callRemote("setFilter",
                                    None, pathfilter, None)
         # ignore failures, setFilter didn't work in 1.0.10 and this is
         # just an optimization anyway
         d.addErrback(lambda f: None)