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.
If the summoner is not found in the DB,
__init__
blocks untiltask.successful()
, wheretask
is anAsyncResult
from calling get_summoners which makes a call to Riot's API and stores the results.Consider combining
__init__
andfull_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.