Azure WebJob文件存储活动触发器替代 [英] Azure WebJob File Storage activity trigger alternative

查看:79
本文介绍了Azure WebJob文件存储活动触发器替代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了问题和答案,但是并不能解决我的问题.

解决以下情况的最佳方法是什么?

  1. 我有一个文件存储库,可以从外部应用程序接收文件.
  2. 我需要尽快处理这些文件.
  3. 目前,这是通过Azure Web作业实现的

这是对已基于TimerTrigger工作的解决方案(Web作业)的更改请求.基本上,它每N分钟执行一次.

由于我无法更改将文件存储到外部程序,因此我的选择仅限于以下情况:

  1. 减少TimerTrigger中的时间,以便每1分钟检查一次文件(对于业务需求而言足够了)

  2. 在我的主文件夹中挂载共享(甚至有可能吗?),然后使用FileTrigger

任何建议都将不胜感激.

解决方案

如您所说,您可以减少TimerTrigger中的时间,以使WebJob更加频繁地执行并检测是否有任何文件上传(或创建)到文件存储中./p>

此外,您可以运行net use命令来安装文件共享.

示例:

net use z: \\samples.file.core.windows.net\logs /u:samples <storage-account-key>

,然后您可以尝试使用FileTrigger来检测是否有新文件到达指定目录.

I read this question and answer but it doesn't solve my problem.

What would be the best way of solving the following scenario.

  1. I have a file storage which receives files from an external app.
  2. I need to process those files as soon as they arrive.
  3. This is currently achieved through an Azure Web Job

This is a change request to a solution (Web Job) which is already working based on a TimerTrigger. Basically it's executed every N minutes.

Since I can't change the external program which puts files into storage, my options are limited to the following:

  1. Decrease the time in TimerTrigger so it checks for files every 1 minute (which is sufficient enough in terms of the business requirements)

  2. Mount a share in my main (is this even possible.?) and use FileTrigger

Any suggestions are greatly appreciated.

解决方案

As you said, you could decrease the time in TimerTrigger to let WebJob execute more frequent and detect whether any files are uploaded (or created) to file storage.

Besides, you can run the net use command to mount the file share.

example:

net use z: \\samples.file.core.windows.net\logs /u:samples <storage-account-key>

and then you could try to use FileTrigger to detect whether new files arrive in the specified directory.

这篇关于Azure WebJob文件存储活动触发器替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆