mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-04 06:01:23 +09:00
Migrate deployment installs off their ad-hoc daemon thread onto the unified job system. DeploymentJobService.install_template now enqueues a 'deploy.install' Job instead of spawning a thread via _start_background_job (retired); the JobConsumer runs it by calling the existing run_job. - max_attempts=1: installs create containers/files/an app row and are not idempotent, so no auto-retry (preserves prior single-shot behavior). - The unified Job shares the DeploymentJob's correlation_id and links back via owner_type='deployment_job'/owner_id; the DeploymentJob row stays the rich record (plan/steps/logs/progress). A failed run raises so both rows show failed. - Bonus: CLI `deploy-template` (no --wait) now persists to the queue and runs when a consumer is available, instead of dying with the CLI process. - tests: handler success/failure mapping + install_template enqueues-not-threads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>