加入时间管理模块,使用md5验证实现热加载config.json变化

This commit is contained in:
a5225662
2023-03-23 22:47:26 +08:00
parent 5e48dd50ac
commit 9fe59f2949
4 changed files with 82 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ import os
from common.log import logger
config = {}
md5 = None
def load_config():
global config
@@ -17,6 +17,7 @@ def load_config():
# 将json字符串反序列化为dict类型
config = json.loads(config_str)
logger.info("[INIT] load config: {}".format(config))
return config