azure - ActivityTrigger持久功能: max execution time limit via Azure Function App and Consumption plan

标签 azure azure-functions azure-functions-runtime

ActivityTrigger 持久功能是否仍通过以下消耗计划限制为 10 分钟的最大超时持续时间:

https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout

我发现了下面的示例,它似乎运行了超过 10 分钟。

[FunctionName("A_SimulateLongRunningTask")]
public static async Task<object> TaskExecutor([ActivityTrigger] string taskInput, TraceWriter log)
{
   dynamic longRunningTask = JsonConvert.DeserializeObject(taskInput);

   //Simulate a long running task, based on the provided duration
   //taskDurationInSeconds is 700 seconds, which is more than max of 10mins via consumption plan
   await Task.Delay(TimeSpan.FromSeconds((int)longRunningTask.taskDurationInSeconds));
   return true;
}

https://toonvanhoutte.wordpress.com/2018/08/19/perform-long-running-logic-apps-tasks-with-durable-functions/

https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#timeout

最佳答案

这是一种将长时间运行的任务分解为多个较短运行的任务,然后将它们链接在一起的方法,以便每个任务在完成后调用工作流中的下一个任务。这本质上可以使您摆脱 Azure Functions 运行时施加的有限时间限制,该限制限制了函数在自动终止之前可以执行的最长时间。

所有这些模式都必须执行需要自定义代码的任务,并且它们需要以异步方式运行,可能在很长一段时间内,Azure Durable Functions 绝对是这样的方式去。这篇博文描述了我们如何通过持久函数和 webhook 操作模式实现处理长时间运行任务的通用方法。

关于azure - ActivityTrigger持久功能: max execution time limit via Azure Function App and Consumption plan,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57547152/

相关文章:

Azure 中国存储 - AZCopy 上传失败

azure - Azure 服务总线是否可以作为公共(public)端点和私有(private)端点公开?

git - 尝试执行多次 checkout 时,Azure Pipeline 会创建第二个源代码文件夹 (Build.SourcesDirectory)

azure - 使用环境变量部署 Azure Functions - Nodejs

c# - Azure Function App v4 + .NET 6.0(正在进行中)+ Blob 绑定(bind)(未触发)= 无法将 Blob 绑定(bind)到类型错误

javascript - Azure b2c 忘记密码链接有时会重定向回登录

c# - 在 function.json 中参数化 runOnStartup

c# - 如何在本地测试 Azure Functions 身份验证

Azure Function 在执行期间关闭

azure - 使用运行时 4、.NET 6 在进程外运行 Azure 函数时遇到问题