diff options
author | Magnus Granberg <zorry@gentoo.org> | 2021-01-25 00:17:41 +0100 |
---|---|---|
committer | Magnus Granberg <zorry@gentoo.org> | 2021-01-25 00:17:41 +0100 |
commit | 5cff75736ed859645d9273888b8c8a4a3f66c07f (patch) | |
tree | ec04b4a2c1694a0f9734542f412975cb413aaa1f /buildbot_gentoo_ci/db/projects.py | |
parent | Add BuildFactory build_request_check and start of run_build_request (diff) | |
download | tinderbox-cluster-5cff75736ed859645d9273888b8c8a4a3f66c07f.tar.gz tinderbox-cluster-5cff75736ed859645d9273888b8c8a4a3f66c07f.tar.bz2 tinderbox-cluster-5cff75736ed859645d9273888b8c8a4a3f66c07f.zip |
Add SetMakeProfile
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
Diffstat (limited to 'buildbot_gentoo_ci/db/projects.py')
-rw-r--r-- | buildbot_gentoo_ci/db/projects.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/buildbot_gentoo_ci/db/projects.py b/buildbot_gentoo_ci/db/projects.py index 065c9a0..5c3406a 100644 --- a/buildbot_gentoo_ci/db/projects.py +++ b/buildbot_gentoo_ci/db/projects.py @@ -79,6 +79,18 @@ class ProjectsConnectorComponent(base.DBConnectorComponent): res = yield self.db.pool.do(thd) return res + @defer.inlineCallbacks + def getProjectPortageByUuidAndDirectory(self, uuid, directory): + def thd(conn): + tbl = self.db.model.projects_portage + q = tbl.select() + q = q.where(tbl.c.project_uuid == uuid) + q = q.where(tbl.c.directorys == directory) + return [self._row2dict_projects_portage(conn, row) + for row in conn.execute(q).fetchall()] + res = yield self.db.pool.do(thd) + return res + def _row2dict(self, conn, row): return dict( uuid=row.uuid, @@ -102,3 +114,11 @@ class ProjectsConnectorComponent(base.DBConnectorComponent): auto=row.auto, pkgcheck=row.pkgcheck ) + + def _row2dict_projects_portage(self, conn, row): + return dict( + id=row.id, + project_uuid=row.project_uuid, + directorys=row.directorys, + value=row.value + ) |