feat(scheduler): admin-tunable maintenance re-validation batch size
Expose the maintenance job's rolling re-validation batch (videos re-checked per run) as an admin control on the Scheduler dashboard, stored in app_state (migration 0018; NULL = the env/config default). The job reads the effective value each run via a state helper, clamped to a sane range. Trilingual.
This commit is contained in:
parent
adf567a4ad
commit
51a8b3f24f
11 changed files with 183 additions and 232 deletions
30
backend/alembic/versions/0018_maintenance_batch_setting.py
Normal file
30
backend/alembic/versions/0018_maintenance_batch_setting.py
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
"""admin override for the maintenance re-validation batch size
|
||||
|
||||
Revision ID: 0018_maintenance_batch_setting
|
||||
Revises: 0017_notifications
|
||||
Create Date: 2026-06-18
|
||||
|
||||
Adds app_state.maintenance_revalidate_batch: an admin-tunable override (from the Scheduler
|
||||
dashboard) for how many videos the maintenance job re-validates per run. NULL = use the
|
||||
env/config default. Purely additive.
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
from alembic import op
|
||||
|
||||
revision: str = "0018_maintenance_batch_setting"
|
||||
down_revision: Union[str, None] = "0017_notifications"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"app_state",
|
||||
sa.Column("maintenance_revalidate_batch", sa.Integer(), nullable=True),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("app_state", "maintenance_revalidate_batch")
|
||||
Loading…
Add table
Add a link
Reference in a new issue