Esempio n. 1
0
def api_status():
    try:
        status.get()
    except KeyError:
        return json_response({
            'coffee': {'status': 'unknown'}
        })

    return json_response({
        'coffee': status.to_dict()
    })
Esempio n. 2
0
def api_status():
    try:
        status.get()
    except KeyError:
        return json_response({
            'coffee': {'status': 'unknown'}
        })

    return json_response({
        'coffee': status.to_dict()
    })
Esempio n. 3
0
def api_stats():
    return json_response({
        'stats': status.get_stats()
    })
Esempio n. 4
0
def api_stats():
    return json_response({
        'stats': status.get_stats()
    })