fix AND MicroMsg实时数据库 #82

This commit is contained in:
xaoyaoo committed 2024-03-15 09:38:20 +08:00
1 parent 2c5e08a33b
commit 62ffe4080e
6 files changed
+16 -5

No files matched your search

+6 -1
View File
@@ -309,6 +309,7 @@ def get_real_time_msg():
"""
save_msg_path = read_session(g.sf, "msg_path")
save_media_path = read_session(g.sf, "media_path")
save_micro_path = read_session(g.sf, "micro_path")
wx_path = read_session(g.sf, "wx_path")
key = read_session(g.sf, "key")
@@ -316,15 +317,19 @@ def get_real_time_msg():
return ReJson(1002, body="msg_path or media_path or wx_path or key is required")
media_paths = get_core_db(wx_path, ["MediaMSG"])
msg_paths = get_core_db(wx_path, ["MSG"])
micro_paths = get_core_db(wx_path, ["MicroMsg"])
if not media_paths[0] or not msg_paths[0]:
if not media_paths[0] or not msg_paths[0] or not micro_paths[0]:
return ReJson(1001, body="media_paths or msg_paths is required")
media_paths = media_paths[1]
media_paths.sort()
msg_paths = msg_paths[1]
msg_paths.sort()
micro_paths = micro_paths[1]
micro_paths.sort()
merge_real_time_db(key=key, db_path=media_paths[-1], merge_path=save_media_path)
merge_real_time_db(key=key, db_path=msg_paths[-1], merge_path=save_msg_path)
merge_real_time_db(key=key, db_path=micro_paths[-1], merge_path=save_micro_path)
return ReJson(0, "success")