Ejemplo n.º 1
0
def get_rtime_data(base_errors_url):
    """Download retracers results url and return json data."""
    # limit of 1 will only return today's data
    results_url = (
        '%s/retracers-average-processing-time/?limit=1&format=json' %
        base_errors_url)
    results_json = util.get_json_from_url(results_url)
    return results_json
Ejemplo n.º 2
0
def get_docker_data():
    """Get download for specific distro."""
    results = {}
    for distro in DISTROS:
        print('collecting data for %s' % distro)
        try:
            response = util.get_json_from_url('%s/%s' % (BASE_URL, distro))
        except urllib.error.HTTPError:
            print('failed to get data for %s' % distro)
            continue

        results[distro] = response['pull_count']

    return results
Ejemplo n.º 3
0
def get_rresults_data(base_errors_url):
    """Download retracers results url and return json data."""
    # limit of 1 will only return today's data
    results_url = '%s/retracers-results/?limit=1&format=json' % base_errors_url
    results_json = util.get_json_from_url(results_url)
    return results_json
def get_queue_data():
    """Download queue url and return json data."""
    queue_url = 'http://autopkgtest.ubuntu.com/queues.json'
    queue_json = util.get_json_from_url(queue_url)
    return queue_json