intervall
This commit is contained in:
@@ -89,6 +89,20 @@ class SystemLogEntry(Base):
|
||||
user_id: Mapped[int | None] = mapped_column(ForeignKey("sync_users.id", ondelete="SET NULL"))
|
||||
|
||||
|
||||
class SchedulerSettings(Base):
|
||||
"""Singleton row (id is always 1) holding the admin-configurable day/night
|
||||
sync interval -- editable at runtime via the UI, unlike SYNC_INTERVAL_MINUTES
|
||||
which only seeds this row's initial values on first startup."""
|
||||
|
||||
__tablename__ = "scheduler_settings"
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
||||
day_start_hour: Mapped[int] = mapped_column(Integer, nullable=False, default=6)
|
||||
night_start_hour: Mapped[int] = mapped_column(Integer, nullable=False, default=22)
|
||||
day_interval_minutes: Mapped[int] = mapped_column(Integer, nullable=False, default=5)
|
||||
night_interval_minutes: Mapped[int] = mapped_column(Integer, nullable=False, default=5)
|
||||
|
||||
|
||||
class SyncRun(Base):
|
||||
__tablename__ = "sync_runs"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user