CDRH / lewisandclark

The Journals of the Lewis and Clark Expedition Rails Site
https://lewisandclarkjournals.unl.edu
1 stars 0 forks source link

Augment use of initializers #163

Open techgique opened 7 years ago

techgique commented 7 years ago

Interested in adding a periodic refresh of variables set by initializers in case data changes and we forget to restart the web app. Just one more way to make updating data mistake-proof.

Ideally would try to do something where anytime we run a script to post to Solr/ES, it sets an environment variable or some other trigger that causes the web app to reload data from its initializers or restarts the web app. Then we're not wasting cycles with unnecessary periodic checks either.

jduss4 commented 7 years ago

This would only work out if we were posting from the same server, and right now I think we've been posting from Rosie. I like this idea, though. Maybe it should just periodically re-initialize every several days as a halfway measure?

jduss4 commented 7 years ago

I just had another thought, which is that we should probably document the custom initializer code somewhere to help people with troubleshooting if suddenly the app crashes and won't restart, etc.