These are chat archives for yasp-dota/yasp

2nd
Feb 2016
Evaldo Bratti
@evaldobratti
Feb 02 2016 01:49

Hi there
I have already talked to you about a functionality that I wish to develop on yasp. I have already implemented this and it's working on dotaparty.me, but I want to learn some new technologies.
I have a question about the fullhistory.js
It starts to collect my match ids, and when I think it should start to download them, it only download one match each time

23:47:57 fullhistory.1 | 712 matches found, 4 already in db, 708 to add
23:47:57 fullhistory.1 | 2016-02-02T01:47:57.437Z - info: getData: http://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?key=<ommited>&match_id=<ommited>
23:47:59 fullhistory.1 | 2016-02-02T01:47:59.369Z - info: getData: http://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?key=<ommited>&account_id=<ommited>&matches_requeste...

and then it starts to collects all matches ids again
is it correct or am I missing something?

Howard Chung
@howardchung
Feb 02 2016 03:45
if you have a feature idea, please open an issue for it on github!
so how it works is that it scans all the heroes and builds a set of all the match ids it found
then it removes the ids that are already found in the db for that user
then it does a getmatchdetails on each remaining ID
a fh request is queued each time a user signs in
so if you signed in multiple times we might be processing them in parallel
you can use the status page to see how many fh are in queue
generally it's idempotent so you end up with the same result but you might do some extra api reqs if you're doing the the same fh request in parallel