(match_id)
Get the details of the given match_id, check if it's valid, and
    if it is, add it as a record in the database and spawn a thread to
    download and parse the corresponding replay.
Get the details of the given match_id, check if it's valid, and
    if it is, add it as a record in the database and spawn a thread to
    download and parse the corresponding replay.
Get the details of the given match_id check if it s valid and if it is add it as a record in the database and spawn a thread to download and parse the corresponding replay .
def process_match_details(match_id):
    '''Get the details of the given match_id, check if it's valid, and
    if it is, add it as a record in the database and spawn a thread to
    download and parse the corresponding replay.'''
    global last_match_id
    gmd = api.get_match_details(match_id)['result']

    if not is_valid_match(gmd):
        logger.debug('Not considering match %s.' % match_id)
        return

    game_mode = get_game_mode_string(gmd['game_mode'])

    #print 'Match ID: %s - Game Mode: %s' % (match_id, game_mode)

    match_collection.insert(gmd)
    logger.debug('Processed match_id=%s' % match_id)

    last_match_id = match_id
def process_match_details ( match_id ) : global last_match_id gmd = api . get_match_details ( match_id ) [ 'result' ] if not is_valid_match ( gmd ) : logger . debug ( 'Not considering match %s.' % match_id ) return game_mode = get_game_mode_string ( gmd [ 'game_mode' ] ) #print 'Match ID: %s - Game Mode: %s' % (match_id, game_mode) match_collection . insert ( gmd ) logger . debug ( 'Processed match_id=%s' % match_id ) last_match_id = match_id