Ejemplo n.º 1
0
def get_group_scoreboards(tid):
    """Gets the group scoreboards.

    Because of the multithreaded implementation we rebuild the scoreboard in the aggregator, this call can only
    return a value from cache. This prevents multiple page requests from invoking a scoreboard rebuild simultaneously.
    Get all groups a users is a member of and look for group scoreboards for each of these groups.
    """
    group_scoreboards = []
    groups = group.get_group_membership(tid)
    for g in groups:
        board = cache.get('groupscoreboard_'+g['name'])
        if board is not None:
            group_scoreboards.append(json.loads(board))
    return group_scoreboards
Ejemplo n.º 2
0
def get_group_scoreboards(tid):
    """Gets the group scoreboards.

    Because of the multithreaded implementation we rebuild the scoreboard in the aggregator, this call can only
    return a value from cache. This prevents multiple page requests from invoking a scoreboard rebuild simultaneously.
    Get all groups a users is a member of and look for group scoreboards for each of these groups.
    """
    group_scoreboards = []
    groups = group.get_group_membership(tid)
    for g in groups:
        board = cache.get('groupscoreboard_'+g['name'])
        if board is not None:
            group_scoreboards.append(json.loads(board))
    return group_scoreboards
Ejemplo n.º 3
0
def get_group_membership_hook():
    return group.get_group_membership(session['tid'])
Ejemplo n.º 4
0
def get_group_membership_hook():
    return group.get_group_membership(session['tid'])