changeset 7260:52544ad8a946

ini: drop setting initial_repo_scan The ini setting 'initial_repo_scan' caused a repository scan on each startup of Kallithea. The accompanying comment already warns that the feature should be disabled after the first run to improve startup time. Now that setup-db is performing the initial repository scan, and considering that administrators can always request a new scan using 'gearbox repo-scan' or via the web interface, the 'initial_repo_scan' feature is no longer considered useful and is removed with this commit.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Fri, 04 May 2018 21:45:55 +0200
parents 6e270cedc8aa
children 9005c37dbe21
files development.ini kallithea/config/app_cfg.py kallithea/lib/paster_commands/template.ini.mako scripts/generate-ini.py
diffstat 4 files changed, 0 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/development.ini	Tue May 01 21:59:03 2018 +0200
+++ b/development.ini	Fri May 04 21:45:55 2018 +0200
@@ -98,11 +98,6 @@
 cache_dir = %(here)s/data
 index_dir = %(here)s/data/index
 
-## perform a full repository scan on each server start, this should be
-## set to false after first startup, to allow faster server restarts.
-#initial_repo_scan = false
-initial_repo_scan = true
-
 ## uncomment and set this path to use archive download cache
 archive_cache_dir = %(here)s/tarballcache
 
--- a/kallithea/config/app_cfg.py	Tue May 01 21:59:03 2018 +0200
+++ b/kallithea/config/app_cfg.py	Fri May 04 21:45:55 2018 +0200
@@ -171,10 +171,6 @@
 
     check_git_version()
 
-    if str2bool(config.get('initial_repo_scan', True)):
-        repo2db_mapper(ScmModel().repo_scan(repos_path),
-                       remove_obsolete=False, install_git_hooks=False)
-
 
 hooks.register('configure_new_app', setup_configuration)
 
--- a/kallithea/lib/paster_commands/template.ini.mako	Tue May 01 21:59:03 2018 +0200
+++ b/kallithea/lib/paster_commands/template.ini.mako	Fri May 04 21:45:55 2018 +0200
@@ -193,10 +193,6 @@
 cache_dir = %(here)s/data
 index_dir = %(here)s/data/index
 
-<%text>## perform a full repository scan on each server start, this should be</%text>
-<%text>## set to false after first startup, to allow faster server restarts.</%text>
-initial_repo_scan = false
-
 <%text>## uncomment and set this path to use archive download cache</%text>
 archive_cache_dir = %(here)s/tarballcache
 
--- a/scripts/generate-ini.py	Tue May 01 21:59:03 2018 +0200
+++ b/scripts/generate-ini.py	Fri May 04 21:45:55 2018 +0200
@@ -17,7 +17,6 @@
                 'host': '0.0.0.0',
             },
             '[app:main]': {
-                'initial_repo_scan': 'true',
                 'debug': 'true',
                 'app_instance_uuid': 'development-not-secret',
                 'beaker.session.secret': 'development-not-secret',