| | |
| | | self.__code_blocks[code] = val |
| | | return self.__code_blocks[code] |
| | | |
| | | def get_jx_blocks_cache(self, code): |
| | | return self.__code_blocks.get(code) |
| | | |
| | | |
| | | # 开盘啦禁止交易板块管理 |
| | | class KPLPlateForbiddenManager: |
| | |
| | | else: |
| | | return reasons |
| | | |
| | | def get_history_limit_up_reason_cache(self, code): |
| | | reasons = self.__history_limit_up_reason_dict.get(code) |
| | | return reasons |
| | | |
| | | def set_blocks(self, code, blocks): |
| | | self.__blocks_dict[code] = set(blocks) |
| | | RedisUtils.setex(self.__get_redis(), f"kpl_blocks-{code}", tool.get_expire(), json.dumps(list(blocks))) |
| | |
| | | k1 = {LimitUpCodesPlateKeyManager.today_total_limit_up_reason_dict[code]} |
| | | # 加载今日历史原因,暂时不需要历史原因了 |
| | | k11 = set() # RedisUtils.smembers(self.__get_redis(), f"kpl_limit_up_reason_his-{code}") |
| | | k2 = self.__CodesPlateKeysManager.get_history_limit_up_reason(code) |
| | | k2 = self.__CodesPlateKeysManager.get_history_limit_up_reason_cache(code) |
| | | if k2 is None: |
| | | k2 = set() |
| | | k3 = set() |
| | |
| | | k3 = {industry} |
| | | |
| | | k4 = set() |
| | | jingxuan_blocks = self.__KPLCodeJXBlockManager.get_jx_blocks(code) |
| | | jingxuan_blocks = self.__KPLCodeJXBlockManager.get_jx_blocks_cache(code) |
| | | if jingxuan_blocks: |
| | | k4 |= set([x[1] for x in jingxuan_blocks]) |
| | | for k in [k1, k11, k2, k3, k4]: |