Azure Functions:仅为新事件配置 blob 触发器

Azure Functions: configure blob trigger only for new events(Azure Functions:仅为新事件配置 blob 触发器)

本文介绍了Azure Functions:仅为新事件配置 blob 触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Azure 存储中有大约 80 万个 Blob.当我使用 blobTrigger 创建 azure 函数时,它开始处理我在存储中拥有的所有 blob.如何将我的函数配置为仅针对新的和更新的 blob 触发?

I have about 800k blobs in my azure storage. When I create azure function with a blobTrigger it starts to process all blobs that I have in the storage. How can I configure my function to be triggered only for new and updated blobs?

推荐答案

目前没有办法做到这一点.在内部,我们通过将收据存储在我们的控制容器 azure-webjobs-hosts 中来跟踪我们处理了哪些 blob.任何没有收据的 blob 或旧收据(基于 blob ETag)都将被处理(或重新处理).这就是您现有的 blob 正在处理的原因 - 它们没有收据.BlobTrigger 目前旨在确保最终处理与路径模式匹配的容器中的所有 blob,并在它们更新时重新处理.

There is no way to do this currently. Internally we track which blobs we have processed by storing receipts in our control container azure-webjobs-hosts. Any blob not having a receipt, or an old receipt (based on blob ETag) will be processed (or reprocessed). That's why your existing blobs are being processed - they don't have receipts. BlobTrigger is currently designed to ensure that ALL blobs in a container matching the path pattern are eventually processed, and reprocessed any time they are updated.

如果您对此充满热情,可以在我们的存储库中记录功能请求这里 详细说明您的方案.

If you feel passionately about this, you can log a feature request in our repo here with details on your scenario.

这篇关于Azure Functions:仅为新事件配置 blob 触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Azure Functions:仅为新事件配置 blob 触发器

基础教程推荐