定时任务:修复智能体执行 422、新增描述字段、公开页删除按钮等
- 定时任务执行时按 agent.id 解析智能体,老数据中存的中文显示名会回退按 name 查找,避免 422
- scheduled_tasks 表新增 description 字段(迁移 20260522_01),创建/编辑表单支持,公开页标题下显示
- 公开页(/public/scheduled-tasks/{id})新增删除单次执行记录入口,使用样式化 Dialog 确认
- 公开页左侧标题区精简:去掉 schedule/timezone/最近状态两行;执行列表标题剥离尾部时间戳,"计划"改为"执行时间"
- 工作区定时任务列表:超长标题改为按字符换行不再截断;按 created_at 倒序(新建任务在前)
- 启动 Alembic 升级加超时与单独线程,MySQL 缺库时自动 CREATE DATABASE
- vite build 增加 8GB 内存上限
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
a892f55cb2
commit
a258122e22
14 files changed
+451
-75
No files matched your search
@@ -15,6 +15,7 @@ Surface area:
|
||||
- ``PUT /api/public/scheduled-tasks/runs/{run_id}/files/{i}``— overwrite an editable result file
|
||||
- ``PUT /api/public/scheduled-tasks/runs/{run_id}/body`` — overwrite the inline Markdown body
|
||||
- ``GET /api/public/scheduled-tasks/runs/{run_id}/download`` — zip / md download of result
|
||||
- ``DELETE /api/public/scheduled-tasks/runs/{run_id}`` — remove a single run (no auth)
|
||||
|
||||
The PUT endpoints intentionally skip ownership checks so the anonymous public
|
||||
viewer at ``#/public/scheduled-tasks/<task_id>`` can fix typos in result MD
|
||||
@@ -355,6 +356,20 @@ async def public_update_run_file(
|
||||
raise HTTPException(status_code=400, detail=str(exc))
|
||||
|
||||
|
||||
@router.delete("/runs/{run_id}", status_code=204)
|
||||
async def public_delete_run(run_id: str) -> Response:
|
||||
"""Remove a single run regardless of owner.
|
||||
|
||||
Anonymous — no ownership check, mirroring the existing public PUT endpoints.
|
||||
Tighten this if the deployment requires read-only public sharing.
|
||||
"""
|
||||
service = get_scheduled_task_service()
|
||||
deleted = await service.admin_delete_run(run_id)
|
||||
if not deleted:
|
||||
raise HTTPException(status_code=404, detail=f"Run {run_id} not found")
|
||||
return Response(status_code=204)
|
||||
|
||||
|
||||
@router.put("/runs/{run_id}/body")
|
||||
async def public_update_run_body(run_id: str, body: PublicRunBodyUpdateRequest) -> dict[str, Any]:
|
||||
"""Overwrite the inline Markdown body (``result.content``) of a run.
|
||||
|
||||
Reference in new issue
Block a user