Merge pull request #2720 from coreos-inc/gc-opt

GC optimizations
This commit is contained in:
josephschorr 2017-06-29 20:55:14 +03:00 committed by GitHub
commit 89ab94ffbb
6 changed files with 695 additions and 639 deletions

View file

@ -126,6 +126,11 @@ def initialized_db(appconfig):
# Configure the database.
configure(appconfig)
# Initialize caches.
model._basequery._lookup_team_roles()
model._basequery.get_public_repo_visibility()
model.log.get_log_entry_kinds()
# If under a test *real* database, setup a savepoint.
under_test_real_database = bool(os.environ.get('TEST_DATABASE_URI'))
if under_test_real_database: