执行管道的并行 ForEach 迭代 activity

Parallel ForEach Iteration for Execute Pipeline activity

我想通过 ForEach 并行执行管道 Activity。

下面是父子管道的示例代码。

 {
"name": "Parent",
"properties": {
    "activities": [
        {
            "name": "ForEach1",
            "type": "ForEach",
            "dependsOn": [],
            "userProperties": [],
            "typeProperties": {
                "items": {
                    "value": "@pipeline().parameters.Test",
                    "type": "Expression"
                },
                "isSequential": false,
                "activities": [
                    {
                        "name": "Execute Pipeline1",
                        "type": "ExecutePipeline",
                        "dependsOn": [],
                        "userProperties": [],
                        "typeProperties": {
                            "pipeline": {
                                "referenceName": "Child",
                                "type": "PipelineReference"
                            },
                            "waitOnCompletion": true
                        }
                    }
                ]
            }
        }
    ],
    "concurrency": 10,
    "parameters": {
        "Test": {
            "type": "array",
            "defaultValue": [
                1,
                2
            ]
        }
    },
    "annotations": []
}

}

{
"name": "Child",
"properties": {
    "activities": [
        {
            "name": "Wait1",
            "type": "Wait",
            "dependsOn": [],
            "userProperties": [],
            "typeProperties": {
                "waitTimeInSeconds": 120
            }
        }
    ],
    "concurrency": 10,
    "annotations": []
}

}

执行管道后,ForEach 迭代顺序执行,而不是并行执行,其中顺序执行子管道。 是否有任何我遗漏的配置更改导致子管道按顺序 运行。

我的假设是您正在调试模式下执行管道: 因为我通过触发器执行了相同的代码,所以正如预期的那样,执行管道是并行的

注意:将参数更新为 7 次迭代,因此您可以看到更多子管道