The recent migration of accounts caused a temporary bug on the app. Users who haven't logged in since the update show up without stats and items in the api, since it migrates the account when the user logs in.
So you will always get an error on people who've yet to log in. Eg: http://hawken.heroku.../user/Shadeness
For user's who've logged in since the update, there's a second error in the calculation of PSR. Due to my incompetence in assuming Poop would always have MMR, Poop's stats got cached as null before his account got migrated. So even after he played and had his account migrated, the error persisted.
<Shadeness> log in poop, your breaking everything!
<Poopslinger> i played this morning
<Shadeness> oh hmm
<Shadeness> guess I just gotta reboot the server then
<PoopSlinger> damnit shadeness i thought you were a nerd, turn it off and on is noob level fuzzy bunny
The shitty code I wrote.
@lru_cache()
def get_cached_user(user_guid):
return client.get_user_stats(user_guid)
@ttl_cache(ttl=10*60)
def get_poopslinger_mmr():
user_guid = client.get_user_guid('Poopslinger')
stats = get_cached_user(user_guid)
return stats['MatchMaking.Rating']
Edited by Shadeness, 20 September 2016 - 10:34 AM.
Sign In
Create Account



Back to top








