SolarArbiter / solarforecastarbiter-api

HTTP API and database schema for the Solar Forecast Arbiter
https://api.solarforecastarbiter.org
MIT License
10 stars 6 forks source link

User info retry #201

Closed lboeman closed 4 years ago

lboeman commented 4 years ago

aims at closing #152 This is admittedly a naive approach to retrying the auth0 /userinfo endpoint., but considering this code should only run when a new user logs in for the first time, I think it should be sufficient. Also added logic such that if a 401 is returned, it returns immediately. I'm not sure if we want to add a back off or anything.

alorenzo175 commented 4 years ago

urllib3.Retry may be a more elegant way and includes backing off See https://github.com/SolarArbiter/solarforecastarbiter-core/blob/2c422ec8aef751eff2fa86f346754f5ed2d104d1/solarforecastarbiter/io/api.py#L68-L75