简体   繁体   English

Azure WebJob临时文件夹

[英]Azure WebJob temp folder

Is there an Azure WebJobs preferred mechanism to obtain a local storage folder/path for processing my blob's data (a sqlite db)? 是否有Azure WebJobs首选机制来获取处理我的blob数据的本地存储文件夹/路径(sqlite数据库)? I can get the stream, but need to write it to disk so that Sqlite can open a connection to it. 我可以获取流,但需要将其写入磁盘,以便Sqlite可以打开它的连接。

I know RoleEnvironment.GetLocalResource is meant to be used with WebRoles... is there an equivalent for WebJobs? 我知道RoleEnvironment.GetLocalResource意味着与WebRoles一起使用......是否有与WebJobs相同的东西?

You can use your temporary directory, you can find it as an environment variable called TEMP , usually it'll be under C:\\DWASFiles\\Sites{sitename}\\Temp . 您可以使用临时目录,可以将其作为名为TEMP的环境变量找到,通常它位于C:\\ DWASFiles \\ Sites {sitename} \\ Temp下

One thing to note is that the maximum size allowed there is 500MB for free/shared sites ( see documentation ), for standard it's much higher (~200GB which is shared between sites in that instance). 需要注意的一点是,允许的最大大小为500MB的免费/共享站点( 参见文档 ),标准它要高得多(约200GB,在该实例中的站点之间共享)。

Also maybe trivial but the temporary directory is temporary (will probably be removed when the site is recycled) and one instance cannot see another's temporary directory. 也许是微不足道的,但临时目录是临时的(当网站被回收时可能会被删除)并且一个实例无法看到另一个临时目录。

对于大小调整,免费层和共享层获得1GB空间,基本站点获得10GB,标准站点获得50GB

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM