| | |
| | | # 比较时间的大小 |
| | | import json |
| | | import time |
| | | |
| | | from db.redis_manager import RedisUtils |
| | | from utils.tool import async_call |
| | | |
| | | from l2 import l2_data_manager |
| | |
| | | return True |
| | | else: |
| | | return False |
| | | |
| | | |
| | | # 获取大资金的金额 |
| | | def get_big_money_val(limit_up_price): |
| | |
| | | continue |
| | | if same_time_nums[time_] > 20: |
| | | redis = l2_data_manager._redisManager.getRedis() |
| | | redis.setex("big_data-{}-{}".format(code, int(round(time.time() * 1000))), tool.get_expire(), d1) |
| | | RedisUtils.setex(redis, "big_data-{}-{}".format(code, int(round(time.time() * 1000))), tool.get_expire(), |
| | | d1) |
| | | break |
| | | |
| | | |
| | |
| | | # @async_call |
| | | def save_l2_latest_data_number(code, num): |
| | | redis = l2_data_manager._redisManager.getRedis() |
| | | redis.setex("l2_latest_data_num-{}".format(code), 3, num) |
| | | RedisUtils.setex(redis, "l2_latest_data_num-{}".format(code), 3, num) |
| | | |
| | | |
| | | # 获取最新数据条数 |