##// END OF EJS Templates
indexers: load additional indexers settings from ini
Takumi IINO -
r5559:6ed126ef default
parent child Browse files
Show More
@@ -296,6 +296,18 b' allow_repo_location_change = True'
296 296 ## allows to setup custom hooks in settings page
297 297 allow_custom_hooks_settings = True
298 298
299 ## extra extensions for indexing, space separated and without the leading '.'.
300 # index.extensions =
301 # gemfile
302 # lock
303
304 ## extra filenames for indexing, space separated
305 # index.filenames =
306 # .dockerignore
307 # .editorconfig
308 # INSTALL
309 # CHANGELOG
310
299 311 ####################################
300 312 ### CELERY CONFIG ####
301 313 ####################################
@@ -293,6 +293,18 b' allow_repo_location_change = True'
293 293 <%text>## allows to setup custom hooks in settings page</%text>
294 294 allow_custom_hooks_settings = True
295 295
296 <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text>
297 # index.extensions =
298 # gemfile
299 # lock
300
301 <%text>## extra filenames for indexing, space separated</%text>
302 # index.filenames =
303 # .dockerignore
304 # .editorconfig
305 # INSTALL
306 # CHANGELOG
307
296 308 <%text>####################################</%text>
297 309 <%text>### CELERY CONFIG ####</%text>
298 310 <%text>####################################</%text>
@@ -289,6 +289,18 b' allow_repo_location_change = True'
289 289 ## allows to setup custom hooks in settings page
290 290 allow_custom_hooks_settings = True
291 291
292 ## extra extensions for indexing, space separated and without the leading '.'.
293 # index.extensions =
294 # gemfile
295 # lock
296
297 ## extra filenames for indexing, space separated
298 # index.filenames =
299 # .dockerignore
300 # .editorconfig
301 # INSTALL
302 # CHANGELOG
303
292 304 ####################################
293 305 ### CELERY CONFIG ####
294 306 ####################################
@@ -34,7 +34,7 b' from kallithea.config.routing import mak'
34 34 from kallithea.lib import helpers
35 35 from kallithea.lib.auth import set_available_permissions
36 36 from kallithea.lib.utils import repo2db_mapper, make_ui, set_app_settings,\
37 load_rcextensions, check_git_version, set_vcs_config
37 load_rcextensions, check_git_version, set_vcs_config, set_indexer_config
38 38 from kallithea.lib.utils2 import engine_from_config, str2bool
39 39 from kallithea.lib.db_manage import DbManage
40 40 from kallithea.model import init_model
@@ -130,6 +130,7 b' def load_environment(global_conf, app_co'
130 130 # pylons
131 131 kallithea.CONFIG.update(config)
132 132 set_vcs_config(kallithea.CONFIG)
133 set_indexer_config(kallithea.CONFIG)
133 134
134 135 #check git version
135 136 check_git_version()
@@ -418,6 +418,21 b' def set_vcs_config(config):'
418 418 'utf8'), sep=',')
419 419
420 420
421 def set_indexer_config(config):
422 """
423 Update Whoosh index mapping
424
425 :param config: kallithea.CONFIG
426 """
427 from kallithea.config import conf
428
429 log.debug('adding extra into INDEX_EXTENSIONS')
430 conf.INDEX_EXTENSIONS.extend(re.split('\s+', config.get('index.extensions', '')))
431
432 log.debug('adding extra into INDEX_FILENAMES')
433 conf.INDEX_FILENAMES.extend(re.split('\s+', config.get('index.filenames', '')))
434
435
421 436 def map_groups(path):
422 437 """
423 438 Given a full path to a repository, create all nested groups that this
@@ -297,6 +297,18 b' allow_repo_location_change = True'
297 297 ## allows to setup custom hooks in settings page
298 298 allow_custom_hooks_settings = True
299 299
300 ## extra extensions for indexing, space separated and without the leading '.'.
301 # index.extensions =
302 # gemfile
303 # lock
304
305 ## extra filenames for indexing, space separated
306 # index.filenames =
307 # .dockerignore
308 # .editorconfig
309 # INSTALL
310 # CHANGELOG
311
300 312 ####################################
301 313 ### CELERY CONFIG ####
302 314 ####################################
General Comments 0
You need to be logged in to leave comments. Login now