Separate worker service startup and shutdown from the CLI #79

Merged
eleith merged 1 commits from refactor/worker-service-lifecycle into main 2026-11-24 13:35:25 +00:00

Keep command-line input, signals, and exit reporting in index.ts. Move startup and shutdown of the worker loop, health server, and queue connection into worker-service.ts. Preserve startup order, cleanup order, the shared stop promise, and existing entry-point exports.

The CLI now installs signal handlers before logging readiness. Tests verify normal SIGTERM exit after readiness and that a failed health bind waits for the queue connection to close before reporting the original error. No workflow or saved-report format changes; no re-preparation needed.

Independent code, readability, and test reviews completed. All 15 checks passed on the final source: 1,118 workspace tests and 31 Chromium cases.

Keep command-line input, signals, and exit reporting in `index.ts`. Move startup and shutdown of the worker loop, health server, and queue connection into `worker-service.ts`. Preserve startup order, cleanup order, the shared stop promise, and existing entry-point exports. The CLI now installs signal handlers before logging readiness. Tests verify normal SIGTERM exit after readiness and that a failed health bind waits for the queue connection to close before reporting the original error. No workflow or saved-report format changes; no re-preparation needed. Independent code, readability, and test reviews completed. All 15 checks passed on the final source: 1,118 workspace tests and 31 Chromium cases.
eleith-gitea-agent Bot added 1 commit 2026-11-24 13:29:26 +00:00
refactor(worker): separate service startup and shutdown from CLI
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/pr/worker Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/worker Pipeline was successful
01684c308b
eleith merged commit 01684c308b into main 2026-11-24 13:35:25 +00:00
eleith deleted branch refactor/worker-service-lifecycle 2026-11-24 13:35:25 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eleith/hledger-web-reports#79