加入时间管理模块,使用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

@@ -12,6 +12,7 @@ from concurrent.futures import ThreadPoolExecutor
from common.log import logger
from common.tmp_dir import TmpDir
from config import conf
from common.time_check import time_checker
import requests
import io
import time
@@ -66,6 +67,8 @@ class WechatChannel(Channel):
else:
self._do_send_text(query, from_user_id)
@time_checker
def handle_text(self, msg):
logger.debug("[WX]receive text msg: " + json.dumps(msg, ensure_ascii=False))
content = msg['Text']
@@ -109,6 +112,7 @@ class WechatChannel(Channel):
thread_pool.submit(self._do_send_text, content, to_user_id)
@time_checker
def handle_group(self, msg):
logger.debug("[WX]receive group msg: " + json.dumps(msg, ensure_ascii=False))
group_name = msg['User'].get('NickName', None)