osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
213 stars 129 forks source link

feat: improve beatmap api resilience with tenacity & error handling #493

Closed tsunyoku closed 1 year ago

tsunyoku commented 1 year ago

Describe your changes

Uses tenacity to retry when an exception happens on the web request (connection error or similar), and also explicitly handles when to delete a beatmap when it is fetched for updates so that any server-side error responses that don't actually mean the map got deleted result in an unfairly deleted beatmap.

Related Issues / Projects

Checklist

tsunyoku commented 1 year ago

my local pipenv setup is fucked and won't work (i really wish we didn't have this shit lol) so i cannot add the new tenacity dependency to the Pipfile, will remain in draft until that's sorted

would appreciate if someone could add it for me, pipenv is going to get on my last nerve

NiceAesth commented 1 year ago

I am okay with this so long as tenacity will be used in the future for other endpoints as well.

NiceAesth commented 1 year ago

something's not right with the requirements action and i am not sure i can even see what it is trying to accomplish or why it needs to exist

tsunyoku commented 1 year ago

don't merge until i'm free please

tsunyoku commented 1 year ago

ok should be fine, just wanted to check the changes after mine. will merge it now!