9f0c064f2a
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Failing after 45h27m46s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 45h27m46s
- Alembic 033: generation_tasks 加 batch_id 列+索引 - Route: count>1 时生成共享 batch_id - Repository: list_by_batch() 批次内查询 - dedup.py: check_batch_duplicate() 批次内查重 - Worker: 生成视频后创建 GeneratedVideo 记录 + 双重查重 - 单元测试: 6 个批次查重测试用例
18 lines
526 B
Python
18 lines
526 B
Python
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
from packages.domain import GeneratedVideo
|
|
|
|
|
|
class GeneratedVideoRepository(Protocol):
|
|
def create(self, video: GeneratedVideo) -> GeneratedVideo: ...
|
|
|
|
def get(self, video_id: str) -> GeneratedVideo | None: ...
|
|
|
|
def list_by_project(self, project_id: str) -> list[GeneratedVideo]: ...
|
|
|
|
def list_by_generation_task(self, generation_task_id: str) -> list[GeneratedVideo]: ...
|
|
|
|
def list_by_batch(self, batch_id: str) -> list[GeneratedVideo]: ...
|