basyx commited on
Commit
ee166be
·
verified ·
1 Parent(s): d3ca808

sync: align runtime source with GitHub main

Browse files
Files changed (1) hide show
  1. app/generation/models.py +2 -2
app/generation/models.py CHANGED
@@ -95,9 +95,10 @@ class GenerationJob(Base):
95
  String(36), ForeignKey("workspaces.id", ondelete="RESTRICT"), nullable=False
96
  )
97
  provider: Mapped[str] = mapped_column(String(64), nullable=False)
 
 
98
  brand_kit_version_id: Mapped[str | None] = mapped_column(String(36), nullable=True)
99
  status: Mapped[str] = mapped_column(String(32), nullable=False, default="queued")
100
- progress_percent: Mapped[int | None] = mapped_column(Integer, nullable=True)
101
  attempt_count: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
102
  max_attempts: Mapped[int] = mapped_column(Integer, nullable=False, default=3)
103
  next_attempt_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
@@ -141,7 +142,6 @@ class GenerationJobAttempt(Base):
141
  status: Mapped[str] = mapped_column(String(32), nullable=False)
142
  brand_kit_version_id: Mapped[str | None] = mapped_column(String(36), nullable=True)
143
  external_job_id: Mapped[str | None] = mapped_column(String(128))
144
- error_code: Mapped[str | None] = mapped_column(String(100))
145
  error_message: Mapped[str | None] = mapped_column(Text)
146
  provider_request_id: Mapped[str | None] = mapped_column(String(255))
147
  started_at: Mapped[datetime] = mapped_column(
 
95
  String(36), ForeignKey("workspaces.id", ondelete="RESTRICT"), nullable=False
96
  )
97
  provider: Mapped[str] = mapped_column(String(64), nullable=False)
98
+ # Snapshot the selected brand-kit version on the logical job so retries
99
+ # and result views retain the exact creative policy used at submission.
100
  brand_kit_version_id: Mapped[str | None] = mapped_column(String(36), nullable=True)
101
  status: Mapped[str] = mapped_column(String(32), nullable=False, default="queued")
 
102
  attempt_count: Mapped[int] = mapped_column(Integer, nullable=False, default=0)
103
  max_attempts: Mapped[int] = mapped_column(Integer, nullable=False, default=3)
104
  next_attempt_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True))
 
142
  status: Mapped[str] = mapped_column(String(32), nullable=False)
143
  brand_kit_version_id: Mapped[str | None] = mapped_column(String(36), nullable=True)
144
  external_job_id: Mapped[str | None] = mapped_column(String(128))
 
145
  error_message: Mapped[str | None] = mapped_column(Text)
146
  provider_request_id: Mapped[str | None] = mapped_column(String(255))
147
  started_at: Mapped[datetime] = mapped_column(