Administrator
2023-08-02 8595dc22aa9dde6aba6d0f8cdcf1656a8a59513b
code_attribute/code_volumn_manager.py
@@ -30,11 +30,11 @@
    yesterday = global_util.yesterday_volumn.get(code)
    redis = __redis_manager.getRedis()
    if max60 is None:
        max60 = redis.get("volumn_max60-{}".format(code))
        max60 = RedisUtils.get(redis, "volumn_max60-{}".format(code))
        if max60:
            max60 = json.loads(max60)
    if yesterday is None:
        yesterday = redis.get("volumn_yes-{}".format(code))
        yesterday = RedisUtils.get(redis, "volumn_yes-{}".format(code))
    return max60, yesterday
@@ -51,7 +51,7 @@
    _volumn = global_util.today_volumn.get(code)
    if _volumn is None:
        redis = __redis_manager.getRedis()
        _volumn = redis.get("volumn_today-{}".format(code))
        _volumn = RedisUtils.get(redis, "volumn_today-{}".format(code))
    return _volumn
@@ -96,7 +96,7 @@
    if keys is not None:
        for k in keys:
            code = k.split("-")[1]
            max60_volumn = redis.get(k)
            max60_volumn = RedisUtils.get(redis, k)
            if max60_volumn:
                max60_volumn = json.loads(max60_volumn)
            global_util.max60_volumn[code] = max60_volumn
@@ -104,7 +104,7 @@
    if keys is not None:
        for k in keys:
            code = k.split("-")[1]
            global_util.yesterday_volumn[code] = redis.get(k)
            global_util.yesterday_volumn[code] = RedisUtils.get(redis, k)
if __name__ == "__main__":