智能多媒体服务

  • 智能多媒体服务 > 使用指南 > 任务通知

    任务通知

    最近更新时间: 2020-12-22 09:18:45

    支持对任务处理后的结果,及时进行消息通知。任务通知是异步进行的,不影响正常的操作。支持以回调方式将消息推送到指定URL。

    • 任务执行成功
    • 任务执行失败

    通过工作流创建的任务,任务处理完成后的回调通知内容,消息体是JSON格式。

    注意:

    此处为V2版本的回调内容。

    示例

    通知内容,如下所示:

    {
        "id": "z0.AC11000120BD46928D5E155129025B1D",
        "pipeline": "1810775223.avvod-pipeline",
        "notify": {
            "url": "lfwergwrgwerg"
        },
        "input": {
            "type": "kodo",
            "source": {
                "bucket": "privatebucket_dora_k8s_spock_test",
                "key": "upload.wmv"
            }
        },
        "status": "FINISHED",
        "success": true,
        "result": {
            "code": 0,
            "desc": "The fop was completed successfully",
            "reqid": "2hsAAK4SOuHIzOcV"
        },
        "ops": [
            {
                "op": {
                    "type": "transcode",
                    "params": {
                        "cmd": "avthumb",
                        "format": "mp4"
                    },
                    "save": {
                        "type": "kodo",
                        "info": {
                            "bucket": "publicbucket_dora_k8s_spock_test",
                            "key_template": "{{.fname}}23.mp4"
                        }
                    }
                },
                "result": {
                    "code": 0,
                    "desc": "The fop was completed successfully",
                    "hash": "FkQybCupQoieHwwctvsBNRki3W3h",
                    "bucket": "publicbucket_dora_k8s_spock_test",
                    "key": "upload23.mp4",
                    "returnOld": 0
                }
            }
        ],
        "version": "v2",
        "force": "1"
    }
    
    以上内容是否对您有帮助?
  • Qvm free helper
    Close