included rabbitmq as broker
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Аудит явного повторного запуска failed; request id обеспечивает идемпотентность."""
|
||||
|
||||
from datetime import datetime
|
||||
from uuid import UUID
|
||||
|
||||
from sqlalchemy import ForeignKey, String, func
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.models.base import Base
|
||||
|
||||
|
||||
class JobReplay(Base):
|
||||
__tablename__ = "job_replays"
|
||||
|
||||
id: Mapped[UUID] = mapped_column(primary_key=True)
|
||||
job_id: Mapped[UUID] = mapped_column(ForeignKey("attachment_jobs.id"), index=True)
|
||||
actor: Mapped[str] = mapped_column(String(64))
|
||||
reason: Mapped[str] = mapped_column(String(32))
|
||||
previous_attempt: Mapped[int]
|
||||
attempt_limit: Mapped[int]
|
||||
previous_error_code: Mapped[str | None] = mapped_column(String(64))
|
||||
created_at: Mapped[datetime] = mapped_column(server_default=func.clock_timestamp())
|
||||
Reference in New Issue
Block a user