【发布时间】:2021-09-08 00:42:41
【问题描述】:
我使用 Azure 编排,我想在编排完成后引发一个事件:
[FunctionName(nameof(RunComputingQueueUpdate))]
public async Task RunComputingQueueUpdate(
[QueueTrigger("test-route", Connection = "TestQueue:QueueConnectionString")] string message,
[DurableClient] IDurableOrchestrationClient starter)
{
var command = queueCommunicator.Read<MyCommand>(message);
var instanceId = await starter.StartNewAsync(nameof(RunOrchestratorComputing), command.PartitionKey, command);
// How can I wait here ?
await starter.WaitForCompletionOrCreateCheckStatusResponseAsync(new HttpRequestMessage(), instanceId);
if (!string.IsNullOrEmpty(command.EventInstanceId) && !string.IsNullOrEmpty(command.EventName))
{
await starter.RaiseEventAsync(command.EventInstanceId, command.EventName, command.EventParam);
}
}
我想等待管弦乐队完成,但我不知道如何创建我的 HttpRequest 来执行此操作。 我需要使用 client.CreateHttpManagementPayload(instanceId) 吗?
提前致谢!
【问题讨论】:
标签: azure-functions orchestration