Administrator
2023-08-02 32f47c162b6638a186135ae1267c870233ec21f9
third_data/code_plate_key_manager.py
@@ -92,7 +92,7 @@
    # 今日涨停原因变化
    def set_today_limit_up_reason_change(self, code, from_reason, to_reason):
        RedisUtils.sadd(self.__get_redis(), f"kpl_limit_up_reason_his-{code}", from_reason)
        self.__get_redis().expire(f"kpl_limit_up_reason_his-{code}", tool.get_expire())
        RedisUtils.expire(self.__get_redis(), f"kpl_limit_up_reason_his-{code}", tool.get_expire())
        self.__set_total_keys(code)
    # 设置代码的今日涨停原因
@@ -267,7 +267,7 @@
        reasons = self.__history_limit_up_reason_dict.get(code)
        if reasons is None:
            # 从内存中加载
            val = self.__get_redis().get(f"kpl_his_limit_up_reason-{code}")
            val = RedisUtils.get(self.__get_redis(), f"kpl_his_limit_up_reason-{code}")
            if val is not None:
                val = set(json.loads(val))
                self.__history_limit_up_reason_dict[code] = val
@@ -286,7 +286,7 @@
        reasons = self.__blocks_dict.get(code)
        if reasons is None:
            # 从内存中加载
            val = self.__get_redis().get(f"kpl_blocks-{code}")
            val = RedisUtils.get(self.__get_redis(), f"kpl_blocks-{code}")
            if val is not None:
                val = set(json.loads(val))
                self.__blocks_dict[code] = val