docserver: self-healing Task Scheduler config + docs
Companion to the worker MinIO-retry fix. Makes the worker auto-recover from process death (crash, manual kill, missed boot trigger), not just MinIO outages. - start_worker.bat: propagate Python's exit code (exit /b %rc%) so Task Scheduler can actually detect a failed run (it previously always exited 0). - reconfigure_task.ps1 (new): re-registers PW-DocserverWorker with RestartCount=99 / 1-min interval, StartWhenAvailable, and two triggers — AtStartup plus a 5-min repeating trigger with MultipleInstances=IgnoreNew, so a dead worker relaunches within ~5 min and never double-runs. Idempotent. - install.ps1: same self-healing settings for fresh installs. - Verified on the box: killed the worker -> task relaunched it; firing again while running stayed at one instance. Docs updated to match reality: - docserver/README.md: new 'Reliability / self-healing' section. - document-generation.md: corrected the stale 'Flask DocServer :5050 / HTTP' description to the actual MinIO outbound-only transport. - e2e-test-plan.md: removed the outdated 'Word COM fails under SYSTEM / requires RDP after every reboot' limitation; now self-healing under SYSTEM session 0. - infrastructure.md: fixed VM spec (Win Server 2019, Word 16.0, Python 3.13, SSH port 22422) + self-healing note. - architecture.md / formation-system.md: trigger + self-healing details.
This commit is contained in:
parent
7929413eeb
commit
b48d0cb799
9 changed files with 150 additions and 24 deletions
17
docserver/start_worker.bat
Normal file
17
docserver/start_worker.bat
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
cd /d C:\docserver
|
||||
|
||||
echo [%date% %time%] Starting Performance West Docserver Worker...
|
||||
|
||||
for /f "usebackq tokens=1,* delims==" %%a in ("C:\docserver\docserver.env") do (
|
||||
set "ln=%%a"
|
||||
if not "!ln:~0,1!"=="#" (
|
||||
if not "%%a"=="" set "%%a=%%b"
|
||||
)
|
||||
)
|
||||
|
||||
C:\Python313\python.exe C:\docserver\docserver_worker.py
|
||||
set "rc=%errorlevel%"
|
||||
echo [%date% %time%] Worker exited with code %rc%.
|
||||
endlocal & exit /b %rc%
|
||||
Loading…
Add table
Add a link
Reference in a new issue