Files
xiaoxia-saas/packages/application/get_task_detail_use_case.py
T
Xiaoxia AI b79d6718d6
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 21s
Deploy / Deploy Production (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
style: normalize python formatting gates
2026-06-21 06:52:19 +08:00

18 lines
459 B
Python

"""获取单个任务详情用例"""
from packages.domain import Task
from packages.ports import TaskRepository
class GetTaskDetailUseCase:
"""获取任务详情用例"""
def __init__(self, task_repo: TaskRepository):
self.task_repo = task_repo
def execute(self, task_id: str) -> Task:
task = self.task_repo.get_by_id(task_id)
if not task:
raise ValueError(f"Task {task_id} not found")
return task