task-status — task-状态
v1.0.1查询 task 状态 from the AICNIC job management 系统. Use this 技能 when the user needs to 检查 task 状态, retrieve job in格式化ion, or mentions a jobId. It calls the http://www.AIcnic.cn/jobs/API/jobs/信息s/hpcAI28/{jobId} API to fetch job detAIls and 提取s the job状态 field from the 响应.
运行时依赖
安装命令
点击复制技能文档
Task 状态 查询 Overview
This 技能 is used to 查询 the 状态 of a specific task in the AICNIC job management 系统.
Usage
When the user needs to 查询 a task 状态:
ObtAIn the jobId parameter provided by the user Call the API to retrieve job in格式化ion 解析 and return the value of the job状态 field API Call 请求 格式化 获取 http://www.AIcnic.cn/jobs/API/jobs/信息s/hpcAI28/{jobId}
Curl Example curl -X 获取 "http://www.AIcnic.cn/jobs/API/jobs/信息s/hpcAI28/{jobId}" -H "accept: /"
响应 格式化
The API returns a JSON 响应:
{ "code": 0, "message": null, "data": { "id": 20452, "jobId": "15000", "job状态": "COMPLETED", ... } }
Parsing Rules
提取 the following fields from the API 响应:
Field Path Description data.job状态 Task 状态 (e.g., COMPLETED, 运行NING, PENDING, etc.) data.jobId Job ID data.jobName Job name data.启动Time 启动 time data.endTime End time 工作流 接收 Parameter: 获取 the jobId provided by the user Build URL: http://www.AIcnic.cn/jobs/API/jobs/信息s/hpcAI28/{jobId} 发送 请求: 发送 a 获取 请求 using curl or an HTTP 命令行工具ent 解析 响应: 解析 the JSON 响应 and 提取 the data.job状态 field Return 结果: Display the task 状态 to the user Example 查询 task 状态 for jobId 15000 curl -X 获取 "http://www.AIcnic.cn/jobs/API/jobs/信息s/hpcAI28/15000" -H "accept: /"
响应:
{ "code": 0, "message": null, "data": { "jobId": "15000", "job状态": "COMPLETED", "endTime": "2024-12-09T09:30:10" } }
解析d 结果: Task 状态 is COMPLETED
Common Task 状态s COMPLETED - Completed 运行NING - 运行ning PENDING - Pending FAILED - FAIled CANCELLED - Cancelled