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:
npeter83 2026-06-18 04:37:08 +02:00
parent 264a3c74af
commit dd83718304
11 changed files with 183 additions and 232 deletions

View file

@ -349,6 +349,12 @@ export interface SchedulerStatus {
daily_budget: number;
backfill_reserve: number;
};
maintenance: {
revalidate_batch: number;
revalidate_batch_default: number;
min: number;
max: number;
};
}
export interface Account {
@ -474,6 +480,11 @@ export const api = {
req(`/api/admin/scheduler/jobs/${jobId}/run`, { method: "POST" }),
runAllSchedulerJobs: (): Promise<{ started: string[] }> =>
req("/api/admin/scheduler/run-all", { method: "POST" }),
updateMaintenanceBatch: (revalidateBatch: number): Promise<{ revalidate_batch: number }> =>
req("/api/admin/scheduler/maintenance", {
method: "PATCH",
body: JSON.stringify({ revalidate_batch: revalidateBatch }),
}),
// --- onboarding / admin ---
requestAccess: (email: string): Promise<{ status: string }> =>