[Fix] rqdatac max limit login problem

This commit is contained in:
vn.py 2019-09-30 11:33:54 +08:00
parent 222475fdf9
commit c7dbed9b69
2 changed files with 7 additions and 3 deletions

View File

@ -91,7 +91,7 @@ class CtaEngine(BaseEngine):
self.stop_order_count = 0 # for generating stop_orderid
self.stop_orders = {} # stop_orderid: stop_order
self.init_executor = ThreadPoolExecutor(max_workers=3)
self.init_executor = ThreadPoolExecutor(max_workers=1)
self.rq_client = None
self.rq_symbols = set()

View File

@ -49,8 +49,12 @@ class RqdataClient:
if not self.username or not self.password:
return False
rqdata_init(self.username, self.password,
('rqdatad-pro.ricequant.com', 16011))
rqdata_init(
self.username,
self.password,
('rqdatad-pro.ricequant.com', 16011),
use_pool=True
)
try:
df = rqdata_all_instruments(date=datetime.now())