def get_res(task, done_list):
    if (task in done_list):
        try:
            resp = json.loads(task.result())
        except IndyError as e:
            resp = e.error_code
    else:
        resp = ErrorCode.PoolLedgerTimeout
    return resp
def get_res(task, done_list):
    if (task in done_list):
        try:
            resp = json.loads(task.result())
        except IndyError as e:
            resp = e.error_code
    else:
        resp = ErrorCode.PoolLedgerTimeout
    return resp