Azure WebJob File Storage activity trigger alternative

99封情书 提交于 2019-12-11 06:07:13

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/41289992/azure-webjob-file-storage-activity-trigger-alternative

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!