Merge pull request #86 from pikers/questrade_conns

use >1 asks session connections
use_tractor_logging
goodboy 2020-02-28 12:00:22 -06:00 committed by GitHub
commit d1b76a50e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -212,7 +212,10 @@ class Client:
self, self,
config: dict, config: dict,
): ):
self._sess = asks.Session() # use 2 connections per streaming endpoint (stocks, opts)
# TODO: when we have more then one account key then this should scale
# linearly with that.
self._sess = asks.Session(connections=4)
self.api = _API(self) self.api = _API(self)
self._conf = config self._conf = config
self._is_practice = _use_practice_account or ( self._is_practice = _use_practice_account or (