Phase 6: replace app template with the vet sample domain + jobs slice, pipelines and worker

- templates/app now carries the vet server (parents/pets/treatments/vets/appointments)
- added domain/jobs slice with /jobs OpenAPI paths and Job schema (x- extensions)
- added pipelines/shared scaffold (loader, ports, registry) and the
  appointment_reminder family; worker.py dispatches jobs by kind
- wired init.py, config.py worker knobs, .env.example, docker-compose worker
- unit tests for jobs routes, the pipeline family and worker dispatch (12 passing)
This commit is contained in:
2026-10-20 14:49:10 +05:30
parent 6f6f0d6e6d
commit 56aa1322fb
83 changed files with 2946 additions and 610 deletions

View File

@@ -0,0 +1,33 @@
"""# Summary
CRUD service wiring for the job aggregate via the hexa container.
"""
from hexa import build
from domain.jobs.models import Job
from domain.jobs.ports.db import JobDocument
from infra.adapters.service import CrudsServiceAdaptor
class JobCrudsService(CrudsServiceAdaptor[Job, JobDocument]):
"""Job CRUD service resolving :class:`JobDocument` from a repo.
Notes:
Instances are created by :func:`get_job_service`. The ``model`` and
``schema`` class attributes bind the domain model and its document type.
"""
model = Job
schema = JobDocument
def get_job_service(repo) -> JobCrudsService:
"""Build a job CRUD service wired to ``repo``.
Args:
repo (Any): Integer-id job repository from :func:`create_job_repo`.
Returns:
JobCrudsService: Ready-to-use job CRUD service.
"""
return build(JobCrudsService, instances={"repo": repo})