安排多个Azure函数(powershell和C#)

问题描述 投票:1回答:1

我有2个Azure函数-Powershell。一个将恢复PowerBI嵌入式容量,另一个将暂停它。

然后我有1个Azure函数-一旦PowerBI Embedded Capacity运行,C#就必须运行。

因此,我需要一个执行以下操作的Orchestrator函数:

  1. 等待Powershell功能,直到PowerBI Embedded运行为止
  2. 等待C#函数执行某些任务
  3. 等待Powershell功能以暂停PowerBI Embedded

我一直在研究此代码,但我想只有当您所有的函数都是C#并且在同一Function App中时,此函数才有效。因为我有C#和Powershell,所以我有2个功能应用程序。

[FunctionName("E1_HelloSequence")]
public static async Task<List<string>> Run(
    [OrchestrationTrigger] IDurableOrchestrationContext context)
{
    var outputs = new List<string>();

    outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Tokyo"));
    outputs.Add(await context.CallActivityAsync<string>("E1_SayHello", "Seattle"));
    outputs.Add(await context.CallActivityAsync<string>("E1_SayHello_DirectInput", "London"));

    // returns ["Hello Tokyo!", "Hello Seattle!", "Hello London!"]
    return outputs;
}

任何线索?

c# azure-functions azure-powershell azure-function-app
1个回答
0
投票

Durable Functions当前支持以下语言:

© www.soinside.com 2019 - 2024. All rights reserved.