每轮返回中间值
This commit is contained in:
parent
1e8a08cf60
commit
29db3e0d9a
@ -13,7 +13,7 @@ from app.utils.redis_config import redis_client
|
|||||||
|
|
||||||
def _init(): # 初始化
|
def _init(): # 初始化
|
||||||
dict = {}
|
dict = {}
|
||||||
redis_client.get_redis().set("_global_dict", json.dumps(dict))
|
redis_client.__setattr__("_global_dict", json.dumps(dict))
|
||||||
|
|
||||||
|
|
||||||
def set_value(key, value):
|
def set_value(key, value):
|
||||||
@ -22,7 +22,9 @@ def set_value(key, value):
|
|||||||
if dict is None:
|
if dict is None:
|
||||||
dict = {}
|
dict = {}
|
||||||
dict[key] = value
|
dict[key] = value
|
||||||
redis_client.get_redis().set("_global_dict", json.dumps(dict))
|
# redis_client.get_redis().set("_global_dict", json.dumps(dict))
|
||||||
|
redis_client.__setattr__("_global_dict", json.dumps(dict))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_value(key):
|
def get_value(key):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user