Avoid geocoding when seeding the db during development
DeeDeeG opened this issue · 0 comments
DeeDeeG commented
Context
See this comment (bullet point number 3) by @btyy77c that brought this to my attention: #508 (comment)
Scope and Proposal
Not too hard, I hope.
- Add an environment variable (
SEEDING_DONT_GEOCODE
) or similar.- Probably set this in
setup/entry
beforerails db:setup
, then unset it right after that.
- Probably set this in
- Modify our controllers or models to check this environment variable and not geocode when environment variable (
SEEDING_DONT_GEOCODE
) is set.
Impact
- Stops us from using 21 restroom submissions' worth of quota every time we bring up the Docker image.
- Eliminates error message:
Google Geocoding API error: over query limit.