Example #1
0
def get_devices():
    results = {"err": []}
    for h in hosts:
        cgm = CgminerAPI(host=h['hostname'])
        try:
            data = cgm.devs()
            results[h['name']] = data['DEVS']
        except Exception, errno:
            results["err"].append(h)
            logging.error("timeout")
Example #2
0
def get_summaries():
    results = {"err": []}
    for h in hosts:
        cgm = CgminerAPI(host=h['hostname'])
        try:
            results[h['name']] = cgm.summary()
        except Exception, errno:
            output = "Timeout: " + h['name'] + " " + str(Exception)
            results["err"].append(h) 
            logging.error(output)