RandomZ / app /jobs /models.py
StormShadow308's picture
feat: async pipeline, job queue, generation hardening, and docs
732b14f
Raw
History Blame Contribute Delete
473 Bytes
"""Job payloads for the Redis generation queue."""
from __future__ import annotations
from enum import Enum
from typing import Any
from pydantic import BaseModel, Field
class JobType(str, Enum):
generate = "generate"
agentic_full = "agentic_full"
class GenerationJob(BaseModel):
"""Serializable unit of work for ``jobs_worker.py``."""
job_type: JobType
report_id: str
tenant_id: str
payload: dict[str, Any] = Field(default_factory=dict)