def start(self): self._logger.info('Starting') self.controller.start() IB.sleep(self.appStartupTime) try: self.ib.connect(self.host, self.port, self.clientId, self.connectTimeout) self.ib.setTimeout(self.appTimeout) except: # a connection failure will be handled by the apiError callback pass
def start(self): self.startingEvent.emit(self) self._logger.info('Starting') self.controller.start() IB.sleep(self.appStartupTime) try: self.ib.connect(self.host, self.port, self.clientId, self.connectTimeout) self.ib.setTimeout(self.appTimeout) self.startedEvent.emit(self) except: self.flush()
def start(self): self._logger.info('Starting') self._isRunning = True self.startingEvent.emit(self) self.controller.start() IB.sleep(self.appStartupTime) try: self._connect() self.ib.setTimeout(self.appTimeout) self.startedEvent.emit(self) except: self.controller.terminate() self._scheduleRestart()