任务更新通知接口
## 任务更新通知接口
所有任务的状态变更都是用此接口接收,我方直接传送状态变更后的所有任务状态信息,
- 其中包含的任务更新内容如下:
status 1: 渲染中
status 2: 任务完成
status 3: 任务暂停
status 4: 任务失败
status 5: 等待其他依赖任务完成后继续任务
status 6: 上传文件中
status 7: 处理上传后的文件,提供任务使用
status 8: 任务队列
**请求URL:**
- `http://oem.test.com/api/task/updateinfo`
**请求方式:**
- POST
**参数:**
|字段|类型|必填|注释|
|:---- |:------- |:--- |------ |
|ID |int64 |是 |唯一id|
|Name |string |是 |任务名称|
|Owner |int64 |是 |用户在我方库中的id|
|OwnerName |string |是 |用户名|
|AgencyUserID |int64 |是 |在经销商库中的id|
|CreateTime |int64 |是 |任务创建时间|
|Type |int |是 | 0: video, 1: picture|
|Status |int |是 |渲染状态|
|RenderOutputFiles|[]fileObject |否 |输出文件|
|FrameCount |int |否 |帧数|
|Gross |int64 |是 |帧的费用|
|FrameCompleted |int |否 |完成帧数|
|StartTime |int64 |是 |任务开始渲图时间|
|CompletedTime |int64 |是 |任务完成时间|
|MachineLimit | int |是|任务分配的机器核心数|
|Services | int|是|任务分配的服务器数量|
|RenderTimeThreadTotal |int64 |否 |渲染时长|
|LightJobGross |int64 |是| 小光子任务最终费用|
|LightJobRenderTimeThread|int64|否 | 小光子渲染的线程时|
|RenderZipFile |string |是 |任务源文件|
|Camera |string |是 | 相机名称|
|Action |int |否 | 程序同步的操作 0创建任务,1 更新任务状态,2任务完成并扣费,3任务删除操作,4经销商同步操作
**发送请求示例**
```json
{
"id": 67721,
"name": "PrimerFrame_Box_modeling",
"gross": 38,
"owner": 1601,
"agencyuserid":3,
"type":1,
"status": 2,
"action": 1,
"ownername": "test2",
"starttime": 1574318212,
"createtime": 1574318124,
"framecount": 2,
"completedtime": 1574318325,
"machinelimit": 96,
"services": 4,
"lightjobgross": 2,
"renderzipfile": "/2019-11-21/751278c5-a13b-4371-a4fc-2d955d9d3b02.zip",
"rendertimethreadtotal": 10512,
"framecompleted": 2,
"renderoutputfiles": [
{
"name": "/2019-11-21/67721-PrimerFrame_Box_modeling-frames/000_kx_vray_framebuf.Alpha.0000.TGA",
"size": 55477,
"time": 0,
"isdir": False
},
{
"name": "/2019-11-21/67721-PrimerFrame_Box_modeling-frames/000_kx_vray_framebuf.RGB_color.0000.TGA",
"size": 55477,
"time": 0,
"isdir": False
},
{
"name": "/2019-11-21/67721-PrimerFrame_Box_modeling-frames/A-0000.TGA",
"size": 55477,
"time": 0,
"isdir": False
}
],
"lightjobtimethreadtotal": 480,
"camera":"Camera01",
}
```
**返回示例**
```json
{
"error_code": 0,
"error_msg": "成功",
}
```
**返回参数说明**
|参数名|类型|说明|
|:----- |:-----|----- |
|error_code |int |成功状态,0:成功;1:失败 |
|error_nsg |string |成功,失败