[英]Azure durable function "terminatePostUri" gives 404 when triggered
I'm creating an Azure Durable function app where the orchestrator run for a while but I need an option to cancel the orchestrator if needed.我正在创建一个 Azure Durable function 应用程序,其中协调器运行了一段时间,但如果需要,我需要一个选项来取消协调器。 I'm trying to use the "terminatePostUri" from Postman but it gives me a
404
response.我正在尝试使用 Postman 中的“terminatePostUri”,但它给了我
404
响应。
Other instance management uris like statusQueryGetUri
are working as expected. statusQueryGetUri
等其他实例管理 uri 按预期工作。
Here's a code snippet of my Terminate Function.这是我的 Terminate Function 的代码片段。
[FunctionName("klaviyo_terminate_instance")]
public static Task Run([DurableClient(TaskHub = "%KlaviyoTaskHub%")] IDurableOrchestrationClient client,
[QueueTrigger("terminate-queue")] string instanceId)
{
return client.TerminateAsync(instanceId, "Called for terminate instance");
}
Here's the postman response.这是 postman 响应。
So apparently the terminate uri works as a POST request (but not GET) despite not having any payload.因此,尽管没有任何有效负载,但终止 uri 显然可以作为 POST 请求(但不是 GET)。 Not sure what the reason for that is.
不知道这是什么原因。
Source: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api来源: https://docs.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.