Make notification lookup faster and fix repo pagination on Postgres

This commit is contained in:
Joseph Schorr 2016-03-30 14:46:31 -04:00
parent 2c7aae10a9
commit 42e934d84f
4 changed files with 48 additions and 32 deletions

View file

@ -164,7 +164,7 @@ class RepositoryList(ApiResource):
# Note: We only limit repositories when there isn't a namespace or starred filter, as they
# result in far smaller queries.
if not parsed_args['namespace'] and not parsed_args['starred']:
repos, next_page_token = model.modelutil.paginate(repo_query, RepositoryTable,
repos, next_page_token = model.modelutil.paginate(repo_query, repo_query.c,
page_token=page_token, limit=REPOS_PER_PAGE)
else:
repos = list(repo_query)