def stopService(self): # the worker might be insubstantiating from buildWaitTimeout while self.insubstantiating: yield asyncSleep(0.1) if self.conn is not None or self._substantiation_notifier: yield self._soft_disconnect() self._clearBuildWaitTimer() res = yield AbstractWorker.stopService(self) defer.returnValue(res)
def stopService(self): # the worker might be insubstantiating from buildWaitTimeout if self.state in [ States.INSUBSTANTIATING, States.INSUBSTANTIATING_SUBSTANTIATING ]: yield self._insubstantiation_notifier.wait() if self.conn is not None or self.state in [ States.SUBSTANTIATING, States.SUBSTANTIATED ]: yield self._soft_disconnect() self._clearBuildWaitTimer() res = yield AbstractWorker.stopService(self) return res
def stopService(self): if self.conn is not None or self._substantiation_notifier: yield self._soft_disconnect() res = yield AbstractWorker.stopService(self) defer.returnValue(res)