Implement FastAPI Temporal MVP pipeline

This commit is contained in:
Codex
2026-03-27 00:10:28 +08:00
commit cc03da8a94
52 changed files with 3619 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
"""Workflow routes."""
from fastapi import APIRouter, Depends
from sqlalchemy.ext.asyncio import AsyncSession
from app.api.schemas.workflow import WorkflowStatusResponse
from app.application.services.workflow_service import WorkflowService
from app.infra.db.session import get_db_session
router = APIRouter(prefix="/workflows", tags=["workflows"])
workflow_service = WorkflowService()
@router.get("/{order_id}", response_model=WorkflowStatusResponse)
async def get_workflow_status(
order_id: int,
session: AsyncSession = Depends(get_db_session),
) -> WorkflowStatusResponse:
"""Fetch persisted workflow status for an order."""
return await workflow_service.get_workflow_status(session, order_id)