Example #1
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     if not self.ibcPath:
         self.ibcPath = '/opt/ibc' if os.sys.platform != 'win32' \
             else 'C:\\IBC'
     self._proc = None
     self._monitor = None
     self._logger = logging.getLogger('ib_insync.IBC')
Example #2
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     assert self.controller
     assert self.retryDelay > 0
     self.ib = IB()
     self.ib.client.apiError = self.onApiError
     self.ib.setCallback('error', self.onError)
     self._watcher = asyncio.ensure_future(self.watchAsync())
     self._logger = logging.getLogger('ib_insync.Watchdog')
Example #3
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     Event.init(self, Watchdog.events)
     if not self.controller:
         raise ValueError('No controller supplied')
     if not self.ib:
         raise ValueError('No IB instance supplied')
     if self.ib.isConnected():
         raise ValueError('IB instance must not be connected')
     assert 0 < self.appTimeout < 60
     assert self.retryDelay > 0
     self._runner = None
     self._logger = logging.getLogger('ib_insync.Watchdog')
Example #4
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     Event.init(self, Watchdog.events)
     if not self.controller:
         raise ValueError('No controller supplied')
     if not self.ib:
         raise ValueError('No IB instance supplied')
     if self.ib.isConnected():
         raise ValueError('IB instance must not be connected')
     assert 0 < self.appTimeout < 60
     assert self.retryDelay > 0
     self.ib.errorEvent += self.onError
     self.ib.disconnectedEvent += self.flush
     self._watcher = asyncio.ensure_future(self.watchAsync())
     self._logger = logging.getLogger('ib_insync.Watchdog')
Example #5
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     self.startingEvent = Event('startingEvent')
     self.startedEvent = Event('startedEvent')
     self.stoppingEvent = Event('stoppingEvent')
     self.stoppedEvent = Event('stoppedEvent')
     self.softTimeoutEvent = Event('softTimeoutEvent')
     self.hardTimeoutEvent = Event('hardTimeoutEvent')
     if not self.controller:
         raise ValueError('No controller supplied')
     if not self.ib:
         raise ValueError('No IB instance supplied')
     if self.ib.isConnected():
         raise ValueError('IB instance must not be connected')
     assert 0 < self.appTimeout < 60
     assert self.retryDelay > 0
     self._runner = None
     self._logger = logging.getLogger('ib_insync.Watchdog')
Example #6
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     self.updateEvent = TickerUpdateEvent('updateEvent')
Example #7
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     Event.init(self, Ticker.events)
Example #8
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     self._proc = None
     self._monitor = None
     self._logger = logging.getLogger('ib_insync.IBController')