diff --git a/src/pages/Schedule.tsx b/src/pages/Schedule.tsx index 585efad..b4e1e23 100644 --- a/src/pages/Schedule.tsx +++ b/src/pages/Schedule.tsx @@ -151,11 +151,13 @@ function ScheduleRow({ schedule, owners }: { schedule: Schedule; owners?: Owners ) } -// Content schedules report this week's progress from the engine's production period. +// Content schedules report this week's progress from the engine's production period. Each row +// asks for its own, so it is read once a minute; starting a production refreshes it at once. const useProduction = (agentId: number) => useQuery({ queryKey: ['production', agentId], queryFn: () => productionStatus(agentId), - refetchInterval: q => (q.state.data?.plans.some(p => PLAN_ACTIVE.has(p.status)) ? 5000 : 60_000), + refetchInterval: 60_000, + staleTime: 60_000, }) function ProductionLine({ agentId, active }: { agentId: number; active: boolean }) {