[openstreetmap/openstreetmap-website] Allow models to load when the database is offline (PR #3874)
Tom Hughes
notifications at github.com
Thu Jan 5 20:27:37 UTC 2023
This is an alternative to #3861 to fix #3858 and allow offline mode to be used with the community index.
It turns out that while it used to be necessary to stop `ActiveRecord` loading because it would immediately try and connect the database that is no longer the case as the introduction of switchable database connections means it now only connects when a model is used for the first time.
So we can in fact just get rid of a load of nasty code, part of which involves copying a list of loads from the rails code which then gets out of sync with rails over time.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3874
-- Commit Summary --
* Allow models to load when the database is offline
-- File Changes --
M config/application.rb (17)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3874.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3874.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3874
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3874 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230105/3ca89928/attachment.htm>
More information about the rails-dev
mailing list