# HG changeset patch # User Marcin Kuzminski # Date 1366633214 -7200 # Node ID 88f11b5eb6db80cdd235c6010d619b8a44e50e39 # Parent 0b6982223baab9ad230ea8ec9149014642dfa8b9 added initial_repo_scan flag for controll if repo scaning should be performed on every startup. There's always paster repo-scan or repo scann triggered from admin pannel diff -r 0b6982223baa -r 88f11b5eb6db development.ini --- a/development.ini Mon Apr 22 14:11:53 2013 +0200 +++ b/development.ini Mon Apr 22 14:20:14 2013 +0200 @@ -68,6 +68,10 @@ 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 = true + ## uncomment and set this path to use archive download cache #archive_cache_dir = /tmp/tarballcache diff -r 0b6982223baa -r 88f11b5eb6db production.ini --- a/production.ini Mon Apr 22 14:11:53 2013 +0200 +++ b/production.ini Mon Apr 22 14:20:14 2013 +0200 @@ -68,6 +68,10 @@ 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 = true + ## uncomment and set this path to use archive download cache #archive_cache_dir = /tmp/tarballcache diff -r 0b6982223baa -r 88f11b5eb6db rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl Mon Apr 22 14:11:53 2013 +0200 +++ b/rhodecode/config/deployment.ini_tmpl Mon Apr 22 14:20:14 2013 +0200 @@ -68,6 +68,10 @@ 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 = true + ## uncomment and set this path to use archive download cache #archive_cache_dir = /tmp/tarballcache diff -r 0b6982223baa -r 88f11b5eb6db rhodecode/config/environment.py --- a/rhodecode/config/environment.py Mon Apr 22 14:11:53 2013 +0200 +++ b/rhodecode/config/environment.py Mon Apr 22 14:20:14 2013 +0200 @@ -96,8 +96,9 @@ init_model(sa_engine_db1) repos_path = make_ui('db').configitems('paths')[0][1] - repo2db_mapper(ScmModel().repo_scan(repos_path), - remove_obsolete=False, install_git_hook=False) + if str2bool(config.get('initial_repo_scan', True)): + repo2db_mapper(ScmModel().repo_scan(repos_path), + remove_obsolete=False, install_git_hook=False) set_available_permissions(config) config['base_path'] = repos_path set_rhodecode_config(config) diff -r 0b6982223baa -r 88f11b5eb6db test.ini --- a/test.ini Mon Apr 22 14:11:53 2013 +0200 +++ b/test.ini Mon Apr 22 14:20:14 2013 +0200 @@ -68,6 +68,10 @@ cache_dir = /tmp/rc/data index_dir = /tmp/rc/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 = true + ## uncomment and set this path to use archive download cache #archive_cache_dir = /tmp/tarballcache