chenwardT / lol_stats2

Website to perform match aggregation and analysis for Riot Games' League of Legends.
2 stars 0 forks source link

SingleSummoner init potentially waits on async task completion #1

Open chenwardT opened 8 years ago

chenwardT commented 8 years ago

If the summoner is not found in the DB, __init__ blocks until task.successful(), where task is an AsyncResult from calling get_summoners which makes a call to Riot's API and stores the results.

Consider combining __init__ and full_query if the summoner is not in the DB. To the frontend, this would be seen as a response indicating that loading is taking place, and a list of task IDs to send to the AJAX task status-checking URL. When the status-checker responds in the positive, summoner data can be loaded to the page.