feat(serve): hot-reload service repos on a timer without a restart

Add serve.services_refresh_interval; refresh pulls the repos and re-imports only the changed services, staging any with active jobs until they finish. Report skipped/broken services in the log and on /api/services.
This commit is contained in:
imSp4rky
2026-08-26 23:14:23 -06:00
parent 4964869258
commit 5128fef473
11 changed files with 350 additions and 52 deletions
@@ -76,6 +76,14 @@ directories:
services_repo_force: true
```
!!! info "Refresh inside `serve`"
A running server does not restart to pick up a refresh. Both the periodic refresh
(`serve.services_refresh_interval`, see [serve](services.md#serve)) and the manual
`POST /api/maintenance/refresh-services` endpoint hard-reset the clones and then re-import
only the services that changed. A service with a running or queued download job keeps its
current code until that job finishes, then swaps; `GET /api/services` marks it with
`pending_update` in the meantime.
!!! warning "Read-only installs and reinstalls"
If the services directory lives inside the installed package, a reinstall can delete the
`_repos` clones. They are re-cloned on next use. On **read-only installs** you must