开发者

Download and Open Compressed SQLite3 Database on Heroku

开发者 https://www.devze.com 2022-12-24 19:00 出处:网络
I have a script file for parsing through a SQLite database. I now need to create a CRON job that wi开发者_开发知识库ll download and unzip said database from a third-party (already hosting as SQLITE).

I have a script file for parsing through a SQLite database. I now need to create a CRON job that wi开发者_开发知识库ll download and unzip said database from a third-party (already hosting as SQLITE). I understand this can be done using WGET and UNZIP, but given Heroku's read only file system, is this possible entirely in memory? Thanks.


Heroku's file system is read-only but you can use the tmp and log directory from within your application folder.

From Heroku's doc:

There are two directories that are writeable: ./tmp and ./log (under your application root). If you wish to drop a file temporarily for the duration of the request, you can write to a filename like #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that this file will be there on subsequent requests (although it might be), so this should not be used for any kind of permanent storage.

0

精彩评论

暂无评论...
验证码 换一张
取 消