Esempio n. 1
0
def label(args):
    req_time = timer()
    if request.method == 'GET':
        result = get_autocomplete('label', args['value'])
        print('request time taken', req_time.time_taken())
        return result
    else:
        return make_json_resp("none", 500)
Esempio n. 2
0
def vid_cache_add(args):
    req_time = timer()
    print(args)
    if request.method == 'GET':
        result = get_video_ids_cache( args['session_id'] )
    elif request.method =='PUT':
        result = put_video_ids_cache( args['session_id'], args['video_ids'] )
    print('request time taken', req_time.time_taken() )
    return result
def get_ids(args):
    req_time = timer()
    print(args)

    if args['name_type'] == 'artist_name':
        result = get_smembers('redis-artists-ids', args['name'])

    elif args['name_type'] == 'release_title':
        result = get_smembers('redis-masters-ids', args['name'])

    elif args['name_type'] == 'label_name':
        result = get_smembers('redis-labels-ids', args['name'])

    print('request time taken', req_time.time_taken())
    return result
Esempio n. 4
0
def vid_cache_clear(args):
    req_time = timer()
    print(args)
    result = clear_video_ids_cache(args['session_id'])
    print('request time taken', req_time.time_taken() )
    return result
def unique_metadata(args):
    req_time = timer()
    print(args)
    result = get_unique_metadata(args['tag'])
    print('request time taken', req_time.time_taken())
    return result
Esempio n. 6
0
def get_ids(args):
	req_time = timer()
	print(args)
	result = get_metadata_ids( args )
	print('request time taken', req_time.time_taken() )
	return result