gkucmierz
gkucmierz

Reputation: 1145

How heroku stops running script before deploy new version?

How heroku stops running script before deploy new version?

I was trying to save volatile data before application kill using this package: https://www.npmjs.com/package/kvs-sync

But unfortunately heroku is not allowing using filesystem (readonly).

How can I detect this event to save any variables stored in memory? Or should I save it on every change?

Upvotes: 0

Views: 93

Answers (1)

rsp
rsp

Reputation: 111366

I wouldn't count on any state surviving Heroku restarts. I would use a DB for anything that needs to be persistent. If your data is simple, relatively small and you need very high performance use Redis. For more complex data you can use Mongo, Couch, Rethink or any DB really, relational or not.

Upvotes: 2

Related Questions