fix(update): stop blocking event loop during rebuild + fix infinite spinner
The update endpoint ran the entire git pull + docker build (up to 10 min) synchronously inside the request handler, blocking the whole server for everyone while it ran. Separately, the frontend spinner was only hidden on error, never on success, so it spun forever even when the update worked. - Run the update in a background thread; the request returns immediately - Add GET /settings/update/status for progress polling (backup/pull/build/restart) - Frontend polls status, then waits for the app to come back after the container restart, and shows a clear done/timeout message instead of an endless spinner Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -262,6 +262,14 @@
|
||||
"triggerUpdate": "Start Update",
|
||||
"updateWarning": "The app will be unavailable for ~60 seconds during rebuild.",
|
||||
"confirmUpdate": "Start the update now? The database will be backed up first. The app will restart (~60 seconds downtime).",
|
||||
"updateStepStarting": "Starting update …",
|
||||
"updateStepBackup": "Backing up database …",
|
||||
"updateStepPull": "Fetching code …",
|
||||
"updateStepBuild": "Building Docker image (can take several minutes) …",
|
||||
"updateStepRestart": "Restarting container …",
|
||||
"updateStepReconnecting": "Container is restarting — waiting for connection …",
|
||||
"updateStepDone": "Update complete.",
|
||||
"updateStepTimeout": "Update is taking longer than expected. Check the server logs or reload this page in a few minutes.",
|
||||
"gitTitle": "Git Repository Settings",
|
||||
"gitRepoUrl": "Repository URL",
|
||||
"gitRepoUrlHint": "Used for version checks and one-click updates via Gitea API.",
|
||||
|
||||
Reference in New Issue
Block a user