예제 #1
0
파일: server.py 프로젝트: larseen/coffee
def api_status():
    try:
        status.get()
    except KeyError:
        return json_response({
            'coffee': {'status': 'unknown'}
        })

    return json_response({
        'coffee': status.to_dict()
    })
예제 #2
0
파일: server.py 프로젝트: duvholt/coffee
def api_status():
    try:
        status.get()
    except KeyError:
        return json_response({
            'coffee': {'status': 'unknown'}
        })

    return json_response({
        'coffee': status.to_dict()
    })
예제 #3
0
파일: server.py 프로젝트: larseen/coffee
def api_stats():
    return json_response({
        'stats': status.get_stats()
    })
예제 #4
0
파일: server.py 프로젝트: duvholt/coffee
def api_stats():
    return json_response({
        'stats': status.get_stats()
    })