Heroku临时文件系统和临时文件 [英] Heroku Ephemeral filesystem and temporary files
问题描述
我不明白的是如果dyno不是停止或重新启动?在一段时间之后,文件仍然会被丢弃吗?我们正在建立一个生成PDF文件并通过邮件转发它们的系统(或者你可以下载文件)。我是否需要在发送/下载后自行删除PDF文件,或者我可以依靠它们被Heroku自动删除?
Dynos每24小时循环一次,所以你的文件永远不会超过这个长度。
因此,可以肯定地说,你不需要担心归档这些文件。
注意;只是一件小事。雪松让你写在任何地方的测功机。 Bamboo只允许你写入/ tmp。
As I understand Herokus Ephemeral filesystem will only allow you write access to a temporary folder. Created files in that folder will be discarded when the dyno the files was created with is stopped or restarted.
What I don't understand is what happens if the dyno is not stopped or restarted? Will files still be discarded after a certain time?
We are currently building a system that generates pdf files and forwards them via mail (or you can download the file). Do I need to remove the pdf files myself after they have been sent/downloaded, or can I rely on them being removed automatically by Heroku?
Dynos are cycled every 24 hours so your files will never last longer than that.
Therefore, it's safe to say that you don't need to worry about archiving these files off.
Note; just a small thing. Cedar lets you write to anywhere on the dyno. Bamboo only lets you write to /tmp.
这篇关于Heroku临时文件系统和临时文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!