def startService(self):
        if self.running:
            self._log.warn("Duplicate ClientService.startService {log_source}")
            return
        super(ClientService, self).startService()
        self._failedAttempts = 0

        def connectNow():
            thisLostDeferred = Deferred()

            def clientConnect(protocol):
                self._failedAttempts = 0
                self._loseConnection = protocol.transport.loseConnection
                self._lostDeferred = thisLostDeferred
                self._currentConnection = protocol._protocol
                self._unawait(self._currentConnection)

            def clientDisconnect(reason):
                self._currentConnection = None
                self._loseConnection = _noop
                thisLostDeferred.callback(None)
                retry(reason)

            factoryProxy = _DisconnectFactory(self._factory, clientDisconnect)

            self._stopRetry = _noop
            self._connectionInProgress = (self._endpoint.connect(factoryProxy)
                                          .addCallback(clientConnect)
                                          .addErrback(retry))

        def retry(failure):
            if not self.running:
                return
            self._failedAttempts += 1
            delay = self._timeoutForAttempt(self._failedAttempts)
            self._log.info("Scheduling retry {attempt} to connect {endpoint} "
                           "in {delay} seconds.", attempt=self._failedAttempts,
                           endpoint=self._endpoint, delay=delay)
            self._stopRetry = self._clock.callLater(delay, connectNow).cancel

        connectNow()
Alerts Google that the sitemap for the current site has been updated.
dataset/ETHPy150Open twisted/twisted/twisted/application/internet.py/ClientService.startService--crossover with--dataset/ETHPy150Open django/django/django/contrib/sitemaps/__init__.py/ping_google