移除内置数据库备份设计,统一走 Coolify 备份
This commit is contained in:
@@ -38,7 +38,7 @@ from flask import Flask, jsonify, request, render_template, session
|
||||
|
||||
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||
|
||||
from db import get_db, init_db, get_user_auth, get_user_display_name, backup_database
|
||||
from db import get_db, init_db, get_user_auth, get_user_display_name
|
||||
from wechat import request_api
|
||||
from timer import restore_active_timers, start_all_order_checkers, _active_timers
|
||||
|
||||
@@ -251,10 +251,6 @@ def start_snapshot_scheduler():
|
||||
cleanup_old_data(days=HISTORY_RETENTION_DAYS)
|
||||
except Exception as e:
|
||||
print(f"[数据清理] 失败: {e}")
|
||||
try:
|
||||
backup_database()
|
||||
except Exception as e:
|
||||
print(f"[数据备份] 失败: {e}")
|
||||
t = threading.Thread(target=run, daemon=True)
|
||||
t.start()
|
||||
print("[数据采集] 车辆位置快照采集已启动")
|
||||
@@ -663,11 +659,6 @@ if __name__ == "__main__":
|
||||
|
||||
# 初始化数据库
|
||||
init_db()
|
||||
try:
|
||||
backup_database()
|
||||
print("[数据备份] 启动备份完成")
|
||||
except Exception as e:
|
||||
print(f"[数据备份] 失败: {e}")
|
||||
|
||||
# 恢复未过期的计时器
|
||||
restore_active_timers()
|
||||
|
||||
Reference in New Issue
Block a user