-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support PostGIS as alternative data source to Overpass #10
Conversation
Thanks for this! I tested with the container you mentioned, first using overpass and then switching the backend URL. I get this error:
It seems to get to the point of opening the connection in query, but then throws that exception. |
That's weird; I didn't change anything that involves writing or reading to files. I'm not able to reproduce this. Maybe this is also Sentry related -- try commenting out the |
I'm running it in a docker container. I pulled out all the sentry stuff just to be sure for testing - when I do, I still get the same error. No file name given either. So as far as I can tell it isn't Sentry, and it doesn't seem to be the overpass stuff, since that worked in my tests. |
I did track it down to right as it goes to get a connection and a cursor with print statements. I read the diff before testing - yeah, no changes I saw related to files. :( |
Hmm, this might be a bug with aiopg (which the Overpass backend doesn't use): aio-libs/aiopg#837 Seems it might be specific to a particular combination of Python and SSL versions, so you could try installing different versions, or try some of the other workarounds suggested in that thread. |
OK, try again -- I managed to recreate the issue, and I pulled a monkey-patch workaround from the aiopg issue thread linked above that eliminates the error. |
Hmm. I re-applied my sentry-removal changes after updating to be sure I was doing the same thing. Now I get this:
I'm not sure this isn't just me messing something up here; let me know if you can reproduce this. |
Yes, I also ran into this. if you are running Overscape in a Docker container that's trying to talk to a PostGIS server on the host machine, then the backend hostname should be |
Hmm. That's what my searching turned up too, but that also didn't seem to work. |
This looks good to merge if you're ready (caching, any more metrics you'd like) 🎉 |
❇️ |
To use, just set the
--backend-url
to apostgres://
URL. For example, if you're running the docker-compose setup I added to the Openscape repo a while back, usepostgres://postgres:secret@localhost:5432/osm
. (You'd also need to specify an alternate--port
in this case, since the original tile server in that docker-compose setup also runs on 8080.)@Oliver2213 if you are spinning up a PostGIS data source, please test this.
Fixes #9