コード例 #1
0
ファイル: tasks.py プロジェクト: romanalexander/opendota
def poll_steamplayers_queue():
    """Celery task that handles the constant background refreshing of SteamPlayers.
    
    This task will take up to 100 old SteamPlayers and update them.
    
    Returns True if work was handled; None if no work to be done.
    """
    account_list = []
    accounts = SteamPlayer.get_refresh()
    for account in accounts:
        account_list.append(account.pk)
    if len(account_list) > 0:
        GetPlayerNames(account_list)
        return True
    return None
コード例 #2
0
ファイル: tasks.py プロジェクト: Lrouger/opendota
def poll_steamplayers_queue():
    """Celery task that handles the constant background refreshing of SteamPlayers.
    
    This task will take up to 100 old SteamPlayers and update them.
    
    Returns True if work was handled; None if no work to be done.
    """
    account_list = []
    accounts = SteamPlayer.get_refresh()
    for account in accounts:
        account_list.append(account.pk)
    if len(account_list) > 0:
        GetPlayerNames(account_list)
        return True
    return None