session保存更加合理化

This commit is contained in:
xaoyaoo 2024-01-30 00:21:33 +08:00
parent db6ffab06e
commit 23e3dd3c11
2 changed files with 3 additions and 3 deletions

View File

@ -125,7 +125,7 @@ def contact_list():
limit = request.json.get("limit")
contact_list = analyzer.get_contact_list(micro_path)
save_session(g.sf, "user_list", contact_list)
# save_session(g.sf, "user_list", contact_list)
if limit:
contact_list = contact_list[int(start):int(start) + int(limit)]
return ReJson(0, contact_list)
@ -178,7 +178,7 @@ def contact_count_list():
# 降序
contact_list = sorted(contact_list, key=lambda x: x["chat_count"], reverse=True)
save_session(g.sf, "user_list", contact_list)
# save_session(g.sf, "user_list", contact_list)
if word and word != "" and word != "undefined" and word != "null":
contact_list = [contact for contact in contact_list if

View File

@ -32,7 +32,7 @@ def start_falsk(merge_path="", msg_path="", micro_path="", media_path="", wx_pat
os.makedirs(tmp_path)
print(f"[+] 创建临时文件夹:{tmp_path}")
session_file = os.path.join(tmp_path, "session") # 用于存放各种基础信息
session_file = os.path.join(tmp_path, "session.conf") # 用于存放各种基础信息
from flask import Flask, g
from flask_cors import CORS