From c7dbed9b69b6540a72997ac648bbac3fe196787e Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Mon, 30 Sep 2019 11:33:54 +0800 Subject: [PATCH] [Fix] rqdatac max limit login problem --- vnpy/app/cta_strategy/engine.py | 2 +- vnpy/trader/rqdata.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/vnpy/app/cta_strategy/engine.py b/vnpy/app/cta_strategy/engine.py index c4622fc2..fbd64f04 100644 --- a/vnpy/app/cta_strategy/engine.py +++ b/vnpy/app/cta_strategy/engine.py @@ -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() diff --git a/vnpy/trader/rqdata.py b/vnpy/trader/rqdata.py index 1df27232..1feed7a0 100644 --- a/vnpy/trader/rqdata.py +++ b/vnpy/trader/rqdata.py @@ -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())