chore(scheduler): PDF Fidelity Patrol 巡检节奏 3600s→600s - #1065
Merged
Conversation
- 新增迁移 0091:UPDATE negentropy.scheduled_tasks 将 pdf_fidelity_patrol 的 interval_seconds 3600(1h)→600(10min),重置 next_fire_at=NOW() 令新节奏于下一 tick 即时生效,并同步刷新 description(每 1h→每 600s);downgrade 对称还原。系统任务 (is_system=TRUE) API 不可改,故走前向迁移;已本地 upgrade/downgrade 往返验证。 - 同步 handler docstring/descriptor 中 3600s/1h → 600s/10min 文案,保持单一事实源一致。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景与动机
Scheduler 系统任务 「PDF Fidelity Patrol(PDF→Markdown 高保真自拟合巡检)」(
key=pdf_fidelity_patrol)原节奏为每 3600s(1h) 触发一轮。本 PR 将其收敛为每 600s(10min) 检查一次,以更高频推进高保真自拟合巡检闭环。为何走「新增迁移」而非改配置/调 API
is_system=TRUE),REST 端点PUT /scheduler/tasks/{id}对系统任务显式拒绝改写。negentropy.scheduled_tasks.interval_seconds,仅由种子迁移0076以ON CONFLICT DO NOTHING写入3600,对已存在行无效;且0076已发布,按 Alembic 规范不得回改。0091UPDATE该行(「单一事实源=全部迁移的累积结果」,新旧 DB 均收敛到 600s)。变更内容
0091_pdf_fidelity_patrol_interval_600s.py(0090 → 0091,单一线性 head):interval_seconds3600 → 600;next_fire_at = NOW()—— 令新节奏于下一 tick 即时生效(缩短 interval 时NOW()恒 ≤ 旧计划时刻,仅把下一轮提前);description「每 1h」→「每 600s(10min)」,使 Scheduler UI 展示与真实节奏一致;downgrade()对称还原(interval=3600 + 原 description)。pdf_fidelity_patrol.py:更新 docstring/descriptor 中3600s/1h → 600s/10min文案(纯注释/展示串,无行为变更),保持 SSOT 一致。安全性
叠加 handler「在跑即 SKIP」互斥(
max_concurrency=1)与灰度门控(routine.enabled+routine.patrol_enabled,后者默认 False),改小 interval 无并发/雪崩风险。验证
alembic heads仅单 head0091;history见0090 -> 0091。interval_seconds=600.0、desc 含「每 600s」;downgrade 后interval_seconds=3600.0、desc 复原「每 1h」;验证后将本地 DB 还原至0090(不引入跨 checkout 版本漂移)。🤖 Generated with Claude Code