Re-add the missing method for getting repository builds. Add more logging to try to see why some builds are not getting removed from the queue.

This commit is contained in:
yackob03 2013-11-13 17:29:26 -05:00
parent d7592fd133
commit 0f3d942b5e
2 changed files with 10 additions and 0 deletions

View file

@ -912,6 +912,14 @@ def load_token_data(code):
raise InvalidTokenException('Invalid delegate token code: %s' % code)
def get_repository_build(request_dbid):
try:
return RepositoryBuild.get(RepositoryBuild.id == request_dbid)
except RepositoryBuild.DoesNotExist:
msg = 'Unable to locate a build by id: %s' % request_dbid
raise InvalidRepositoryBuildException(msg)
def list_repository_builds(namespace_name, repository_name,
include_inactive=True):
joined = RepositoryBuild.select().join(Repository)