中控更新改为先同步 git pull 再重启,并修复前端已是最新时一直显示更新中。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -541,7 +541,8 @@ def api_hub_self_update():
|
||||
from lib.update_lib import schedule_pull_and_restart
|
||||
|
||||
try:
|
||||
result = schedule_pull_and_restart(delay_seconds=2.0)
|
||||
# 同步 pull + 延迟重启;timeout 留给 git pull
|
||||
result = schedule_pull_and_restart(delay_seconds=1.2)
|
||||
except Exception as e:
|
||||
result = {"ok": False, "msg": f"触发更新异常: {e}", "deferred": False}
|
||||
return jsonify(result), (200 if result.get("ok") else 400)
|
||||
|
||||
Reference in New Issue
Block a user