zcbot/scripts
caoqianming 1646205364 fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2)
实测 bug:isolated 定时 job 跑满 timeout_seconds 被协作式 cancel 后,
_run_agent_bg 对 ok/cancelled 都把 run_status 收回 idle(DB 不可区分),
而 _execute_scheduled_job 收尾只判 run_status=="error",于是超时中断被落成
last_status="ok" —— 掩盖"跑到一半没写 sections/没推送",且不计连续失败、
不触发兜底。复盘 job e621c8a6「每日水泥科研简报」:timeout=600s,task
创建→last_run_at 正好 600.0s,agent 停在"按期刊打印 38 篇摘要"(还在取数)。

修:超时分支置 timed_out 标志,run 收尾后若 timed_out → record_result(
status="error", 半成品不投递 notify)并直接返回。复用既有 error 语义(计入
consecutive_failures、到阈值自动停用、前端 crons 显示「上次失败」)。不动
_run_agent_bg 的 idle-on-cancel 共享语义(HTTP cancel/drain 也依赖)。

配套:PROGRESS/RUN 故障兜底各加一条;诊断脚本 scripts/diag_sched_e621.py
(dump 输出 scripts/_*.txt 入 gitignore)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 14:35:40 +08:00
..
_smoke_proposal_diagrams.py
backfill_chat_cost_cache_discount.py
backfill_tool_message_name.py
diag_dump_task.py fix(sandbox): docker run 加 --shm-size 修 mmdc 渲 mermaid 挂超时 + bump 0.12.5 2026-06-14 10:40:45 +08:00
diag_error_retry.py
diag_run_python_empty.py
diag_run_python_trace.py
diag_sched_e621.py fix(scheduler): 定时任务超时被掐断时记 error 而非误吞成 ok(bump 0.32.2) 2026-06-29 14:35:40 +08:00
diag_search_args.py
diag_tool_repeat.py
diag_wechat_push.py fix(wechat,email): host-side 文件工具翻译容器路径,修复附件发不出 + bump 0.24.1 2026-06-24 14:02:48 +08:00
diag_wecom.py fix(wecom): diag_wecom 加 sys.path 仓库根 + 手动 .env 兜底(直跑不再 ModuleNotFoundError)+ bump 0.26.5 2026-06-25 10:16:17 +08:00
optimize_arch_ppt.py docs: 用户操作说明书(详+精简)+ 文献库口径 21W→100W + bump 0.16.2 2026-06-17 10:34:08 +08:00
probe_clawbot.py feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00
probe_clawbot_chat.py feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00
probe_clawbot_clientid.py feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00
probe_clawbot_file.py feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00
probe_clawbot_stream.py feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00
probe_clawbot_token.py feat(wechat): ClawBot 个人微信接入第一期(后端 + 绑定页)+ 双渠道设计 §8.7 + bump 0.22.0 2026-06-24 08:59:56 +08:00
probe_seedream_i2i.py
smoke_files_rename.py
smoke_look_at_image.py feat(media): look_at_image 图像理解(豆包 Seed 2.0 Lite vision)+ bump 0.16.0 2026-06-16 16:20:05 +08:00
smoke_paper_skill.py
smoke_scheduler.py test(scheduler): 定时任务端到端 smoke + tick 默认 30s→10s + bump 0.20.1 2026-06-18 15:48:44 +08:00
smoke_scientific_skills.py
smoke_seedance.py
smoke_seedream.py