Azure 函数:一种在 http 触发 azure 函数中触发其他 Azurefunction 的方法?

Azure functions: A way to trigger other Azurefunction in a http-trigger azure function?

在 AzureFunction1 中收到简短通知后,我需要一种可靠的方法,将其快速保存,然后触发另一个 Azurefunction 来分析数据并根据分析结果执行其他操作。

我正在寻找一种向 azure 函数 2 发送请求的方法,让 Azure 函数 2 启动但不会阻止结束 AzureFunction1。我虽然 PATCH HTTP 请求应该用于某些事情。

        [FunctionName("HttpTriger1")]
    public static async Task<IActionResult> Run(
        [HttpTrigger(AuthorizationLevel.Function, "get", "post",Route = null)] HttpRequest req,
        ExecutionContext context,
        ILogger log)

我将请求从获取 post 扩展到获取 post 补丁,但我不知道如何使用 204 作为图形更新请求来回答请求 APi 去做。

我不知道这是否是个好方法,但时间触发器 2 复杂且很难可靠地处理 - 我试过了。

所以如果我的问题有其他方法,请提出其他建议。

我的要求是:

希望有人能帮助我。

谢谢

I search for a way sending an request to azure function 2 let Azure function 2 start but will not block ending AzureFunction1.

我会让 F1 put a message on an Azure Storage Queue and have a queue triggered Azure Function F2 独立于 F1 处理这些消息。

其他可靠的选择可能是使用 Azure 服务总线或 Azure 事件网格触发 F2。

azFunc2 could runner seconds or more and in very rare worst-case more than 1 hour (worst case could be determined and exited an moving to midnight run or something ) so normal execution time will second till a minute

请注意消费计划的最长运行时间为 10 分钟!请参阅 these docs 了解您的选择。