datamade / django-councilmatic

:heartpulse: Django app providing core functions for *.councilmatic.org
http://councilmatic.org
MIT License
26 stars 16 forks source link

Wrap instances of session.get in the _get_response method #152

Closed reginafcompton closed 6 years ago

reginafcompton commented 6 years ago

@evz - can you take a look at this? I integrated _get_response throughout import_data: it should help minimize errors having to do with 504 timeouts in ocd.datamade.us.

reginafcompton commented 6 years ago

@evz - I added *kwargs to _get_response (à la the requests library).

reginafcompton commented 6 years ago

I am closing this PR, since we do not want to wrap all GET requests in _get_response, which throws a warning, rather than raising an error. It makes sense when retrieving the shape_url, since its fine to continue without that info. Otherwise, we want import_data to raise an error.