Jump to content

Photo

HerokuApp Fixed Sept 20

* * * * * 1 votes

  • Please log in to reply
3 replies to this topic

#1
Shadeness

Shadeness

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

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.

  • crockrocket, Guns_N_Rozer, Elite_is_salty and 8 others like this

#2
Elite_is_salty

Elite_is_salty

    Advanced Member

  • Members
  • PipPipPip
  • 1144 posts

i hev nu stets :'(


The PC community is the red headed step child Reloaded never wanted but got saddled with when they married the PC community's mother.

---------------------------------------------------------------

Shoutout to mah real Africans out there.


#3
PsychedelicGrass

PsychedelicGrass

    Advanced Member

  • Members
  • PipPipPip
  • 416 posts
Thanks I love you <3

What's the big fuzzy bunnyng deal? Lots of amazing people have committed suicide, and they turned out alright.

 


#4
claisolais

claisolais

    Advanced Member

  • Members
  • PipPipPip
  • 375 posts

You're awesome.

 

Now I do find my grenadier missing, and all those lvl 6 1 mechs with three 0s... :( Darn this migration hurts (a little)


Ic6j9zJ.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users