Azure媒体服务v3-缺少事件网格作业进度事件

时间:2018-12-05 05:06:28

标签: azure-media-services

Azure Media Services v3-事件网格订阅未报告作业进度事件。

使用端点类型 Web Hook 创建了事件网格订阅-订阅了所有事件。

期望获得进度事件,而仅获得作业状态更改。

我也如何获得工作进度?

以下是唯一收到的工作事件。

  • Microsoft.Media.JobScheduled
  • Microsoft.Media.JobOutputStateChange
  • Microsoft.Media.JobOutputStateChange
  • Microsoft.Media.JobStateChange
  • Microsoft.Media.JobProcessing
  • Microsoft.Media.JobOutputProcessing
  • Microsoft.Media.JobOutputFinished
  • Microsoft.Media.JobOutputStateChange
  • Microsoft.Media.JobStateChange
  • Microsoft.Media.JobFinished

原始事件数据

{
  "topic": "/subscriptions/1234/resourceGroups/ResGroup/providers/Microsoft.Media/mediaservices/amsaccount",
  "subject": "transforms/Transcribe-VideoAnalyzerPreset-Transform/jobs/Transcribe AzureTest TestFilter 071min 636795822392514253",
  "eventType": "Microsoft.Media.JobOutputProcessing",
  "eventTime": "2018-12-05T04:52:30.295037",
  "id": "bc381a10-6ceb-4e0b-9401-a1783dbd7248",
  "data": {
    "previousState": "Scheduled",
    "output": {
      "@odata.type": "#Microsoft.Media.JobOutputAsset",
      "assetName": "d08ebed45dd54256b7fc7448dd466c96",
      "error": null,
      "label": "VideoAnalyzerPreset_0",
      "progress": 0,
      "state": "Processing"
    },
    "jobCorrelationData": {
      "TransformName": "Transcribe-VideoAnalyzerPreset-Transform"
    }
  },
  "dataVersion": "1.0",
  "metadataVersion": "1"
}

{
  "topic": "/subscriptions/1234/resourceGroups/ResGroup/providers/Microsoft.Media/mediaservices/amsaccount",
  "subject": "transforms/Transcribe-VideoAnalyzerPreset-Transform/jobs/Transcribe AzureTest TestFilter 071min 636795822392514253",
  "eventType": "Microsoft.Media.JobOutputFinished",
  "eventTime": "2018-12-05T04:55:28.0774072",
  "id": "eba19e9c-1ee2-4b22-8844-1cf8366f56cb",
  "data": {
    "previousState": "Processing",
    "output": {
      "@odata.type": "#Microsoft.Media.JobOutputAsset",
      "assetName": "d08ebed45dd54256b7fc7448dd466c96",
      "error": null,
      "label": "VideoAnalyzerPreset_0",
      "progress": 100,
      "state": "Finished"
    },
    "jobCorrelationData": {
      "TransformName": "Transcribe-VideoAnalyzerPreset-Transform"
    }
  },
  "dataVersion": "1.0",
  "metadataVersion": "1"
}

1 个答案:

答案 0 :(得分:0)

根据Azure Event Grid schemas for Media Services events,如@AnilMurching所说,Monitoring Job Output State Changes支持从作业事件模式中获取progress属性,但没有时间估计。

要获得一项工作的时间估算,一种变通方法是使用资产大小,其他工作的平均时间成本以及其他有用的参数来计算,以得出近似值。