Exemplo n.º 1
0
def result_pair(uuid):
    query = {
        "database": "obj", "limit": 1, "history": "on",
        "query": {"test-result-id": uuid},
        "project": ["runner.kimcode", "subject.kimcode"]
    }
    return (kimobjects.kim_obj(a) for a in kimquery.query(query, decode=True))
Exemplo n.º 2
0
def result_inqueue(test, model):
    query = {
        "database": "job", "query": {"test": str(test), "model": str(model)},
        "project": ["status"], "limit": 1
    }

    status = kimquery.query(query, decode=True)
    return len(status) > 0
Exemplo n.º 3
0
def result_pair(uuid):
    query = {
        "database": "obj",
        "limit": 1,
        "query": {
            "uuid": uuid
        },
        "project": ["runner.kimcode", "subject.kimcode"]
    }
    return (kimobjects.kim_obj(a) for a in kimquery.query(query, decode=True))
Exemplo n.º 4
0
def result_exists(test, model):
    query = {
        "project": ["test-result-id"], "database": "obj", "query": {
            "runner.kimcode": str(test),
            "subject.kimcode": str(model),
        },
        "limit": 1, "history": "on"
    }

    result = kimquery.query(query, decode=True)
    return len(result) > 0
Exemplo n.º 5
0
def result_inqueue(test, model):
    query = {
        "database": "job",
        "test": str(test),
        "model": str(model),
        "project": ["tube"],
        "limit": 1
    }

    tube = kimquery.query(query, decode=True)
    return len(tube) > 0
Exemplo n.º 6
0
def result_exists(test, model):
    query = {
        "project": ["uuid"],
        "database": "obj",
        "query": {
            "runner.kimcode": str(test),
            "subject.kimcode": str(model),
        },
        "limit": 1
    }

    result = kimquery.query(query, decode=True)
    return len(result) > 0