• 郭阔's avatar
    feat: global harvest queue + configurable schedule planner · cbb0b159
    郭阔 authored
    - harvest.sh: global queue lock (runlocks/.queue, mkdir-atomic, stale-PID
      steal, 180min wait cap) — a source whose time arrives while another is
      harvesting now waits (phase 排队中) and auto-starts when the previous
      run exits; runlock is created before queueing so the panel shows queued
      sources; manual panel trigger no longer refused (it queues)
    - bin/plan_schedules.py + schedule-plan.json: frequency-driven planner —
      deadline/safety/min-gap/day-window/avoid all configurable; morning slots
      laid backward from deadline-safety with exact gaps (wrapping to previous
      evening when the roster exceeds the night), freq>1 sources spread evenly
      across the day window, global gap resolution; --dry-run supported
    - 调度中心: ⚙ 按计划重排全部排程 button (POST /schedule-plan-apply)
    - applied: 12 sources — 3×4/day (wsj/ft/digitimes-feed latest morning
      slots) + 9×1/day, 40-min spacing, last start 05:30 vs 06:00 deadline
    cbb0b159
app.py 57.7 KB