小编Mar*_*lit的帖子

使用 context.CallHttpAsyn 时“检测到多线程执行”

我有一个 OrchestrationTrigger 函数,可以通过 http 请求调用另一个服务。

 [FunctionName("MyFunc")]
        public async Task RunOrchestrator(
        [OrchestrationTrigger] IDurableOrchestrationContext context,
        ILogger logger)
    {
        var req = new DurableHttpRequest(HttpMethod.Post, _uri, headers, jsonBody);
        var res = await context.CallHttpAsync(req);
        // Do something
    }
Run Code Online (Sandbox Code Playgroud)

但出现以下错误:

检测到多线程执行。如果 Orchestrator 函数代码等待的任务不是由 DurableOrchestrationContext 方法创建的,则可能会发生这种情况。更多详细信息可以在这篇文章中找到 :https://learn.microsoft.com/en-us/azure/azure-functions/durable-functions-checkpointing-and-replay#orchestrator-code-constraints

那里的官方文档建议使用 context.CallHttpAsync- 正是我所做的。

azure-functions azure-durable-functions

3
推荐指数
1
解决办法
2512
查看次数

Azure Cosmos DB 帐户中的共享访问签名?

是否可以在 Azure Cosmos DB 帐户中添加共享访问签名?我在导航栏中找不到它

在此输入图像描述

azure azure-cosmosdb

0
推荐指数
1
解决办法
912
查看次数