Azure Function(C#) : How to copy lots of files from blob container A to another blob container B?(函数在 10 分钟内超时)

标签 azure azure-functions timeout azure-blob-storage

想要使用 Azure Function 将大量文件从 Blob 容器 A 复制到另一个 Blob 容器 B。但是,由于函数超时,导致复制文件丢失。有什么方法可以巧妙地恢复它吗?源 blob 存储上是否有任何指示标识了之前已复制/处理过的内容,以便下一个函数可以跳过复制?

最佳答案

Would like to use Azure Function to copy lots of files from blob container A to another blob container B. However, faced missing copying files due to Function timeout.

您可以通过更改计划级别来避免此超时问题。例如,如果您使用应用服务计划并开启始终开启,则不会再有超时限制。但说实话,如果你有很多文件并且需要很长时间,那么 azure 函数不是推荐的方法(该函数执行的任务应该是轻量级的)。

Is there any indication on source blob storage which identified copied/handled before so that next Function can skip copying that?

是的,当然可以。只需在复制 Blob 后添加其自定义元数据即可。下次复制文件时,可以先检查自定义元数据。

关于Azure Function(C#) : How to copy lots of files from blob container A to another blob container B?(函数在 10 分钟内超时),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66380020/

相关文章:

azure - 使用 C# 中的 Azure 逻辑应用发送通知邮件

Azure Web App HTTP/HTTPS 重写规则

javascript - 鼠标悬停事件上的 clearTimeout 未从 Mouseout 事件中清除 setTimeout

php - 长时间运行时定期输出到浏览器

连接到 Azure SQL 数据库 AAD 的 Azure Pipelines - 用户“< token 识别的主体>”登录失败

azure - 使用 powershell 将 azure runbook 及其 webhook 移动到另一个自动化帐户

visual-studio - 无法将 Visual Studio Code Coverage 与 Azure Functions 结合使用

azure - 如何对现有文件多次运行 blob 存储触发器

python - 通过 Http 触发器将新的输入数据发送到已经运行的 Orchestrator 功能

sockets - TIdHttpServer和套接字超时