SuperAPI AI 工具集

background-tasks

办公与效率

查看项目

更新于 10-16 09:31

技能介绍

background-tasks 是 cklxx/elephant.ai 提供的技能,用途是管理后台长时间运行的任务,包括派发任务、查询状态和收集结果。

主要能力包括三个动作:dispatch 派发一个后台命令并附带描述;list 列出当前任务;collect 按 task_id 收集指定任务的结果。

使用方式为通过 python3 运行技能脚本,并以 JSON 字符串传入参数。示例命令: python3 skills/background-tasks/run.py '{"action":"dispatch","command":"go test ./...","description":"run tests"}' python3 skills/background-tasks/run.py '{"action":"list"}' python3 skills/background-tasks/run.py '{"action":"collect","task_id":"abc"}'

适用场景是需要异步执行耗时命令(如运行测试)并稍后获取结果的场合。关于运行环境依赖、任务并发上限、结果保留时长等信息暂未提供。