| | |
| | | hasChanged = False |
| | | for code in codes: |
| | | if code not in self.__first_code_limited_up_record_cache: |
| | | RedisUtils.sadd_async(self.__get_redis(), "first_code_limited_up_record", code) |
| | | RedisUtils.sadd_async(self.__db, "first_code_limited_up_record", code) |
| | | hasChanged = True |
| | | self.__first_code_limited_up_record_cache.add(code) |
| | | if hasChanged: |
| | | RedisUtils.expire_async(self.__get_redis(), "first_code_limited_up_record", tool.get_expire()) |
| | | RedisUtils.expire_async(self.__db, "first_code_limited_up_record", tool.get_expire()) |
| | | |
| | | # 是否涨停过 |
| | | def is_limited_up(self, code): |