Esempio n. 1
0
    def get_summary_builds(self, min_age=0):
        """Return last build age, status for each tree/host/compiler.

        :param min_age: Minimum timestamp of builds to report
        :return: iterator over tree, status
        """
        store = self._get_store()
        return ((tree, BuildStatus.__deserialize__(status_str))
                for (tree, status_str) in store.execute("""
SELECT obd.tree, obd.status AS status_str
FROM build obd
INNER JOIN(
    SELECT MAX(age) age, tree, host, compiler
    FROM build
    WHERE age > ?
    GROUP BY tree, host, compiler
) ibd ON obd.age = ibd.age AND
         obd.tree = ibd.tree AND
         obd.host = ibd.host AND
         obd.compiler = ibd.compiler;
""", (min_age, )))
Esempio n. 2
0
    def get_summary_builds(self, min_age=0):
        """Return last build age, status for each tree/host/compiler.

        :param min_age: Minimum timestamp of builds to report
        :return: iterator over tree, status
        """
        store = self._get_store()
        return ((tree, BuildStatus.__deserialize__(status_str))
                for (tree, status_str) in store.execute(
                    """
SELECT obd.tree, obd.status AS status_str
FROM build obd
INNER JOIN(
    SELECT MAX(age) age, tree, host, compiler
    FROM build
    WHERE age > ?
    GROUP BY tree, host, compiler
) ibd ON obd.age = ibd.age AND
         obd.tree = ibd.tree AND
         obd.host = ibd.host AND
         obd.compiler = ibd.compiler;
""", (min_age, )))