diff --git a/backend/app/models/import_settings.py b/backend/app/models/import_settings.py index 527f4ba..fca7f88 100644 --- a/backend/app/models/import_settings.py +++ b/backend/app/models/import_settings.py @@ -38,3 +38,14 @@ class ImportSettings(Base): download_validate_files: Mapped[bool] = mapped_column( Boolean, nullable=False, default=True ) + + # FC-3d scheduling knobs + download_schedule_default_seconds: Mapped[int] = mapped_column( + Integer, nullable=False, default=28800 + ) + download_event_retention_days: Mapped[int] = mapped_column( + Integer, nullable=False, default=90 + ) + download_failure_warning_threshold: Mapped[int] = mapped_column( + Integer, nullable=False, default=5 + ) diff --git a/backend/app/models/source.py b/backend/app/models/source.py index 13a01bf..9c90e81 100644 --- a/backend/app/models/source.py +++ b/backend/app/models/source.py @@ -27,5 +27,6 @@ class Source(Base): last_checked_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True) last_error: Mapped[str | None] = mapped_column(Text, nullable=True) check_interval_override: Mapped[int | None] = mapped_column(Integer, nullable=True) + consecutive_failures: Mapped[int] = mapped_column(Integer, nullable=False, default=0) artist = relationship("Artist", back_populates="sources")