pyramid: use a faster scan method for faster app start.
This commit is contained in:
parent
17359c262c
commit
1c20025ca7
14 changed files with 32 additions and 23 deletions
|
|
@ -189,4 +189,4 @@ def includeme(config):
|
|||
config.include(admin_routes, route_prefix=ADMIN_PREFIX)
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -87,4 +87,4 @@ def includeme(config):
|
|||
pattern=settings.get('channelstream.proxy_path') or '/_channelstream')
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def includeme(config):
|
|||
custom_predicates=(debug_style_enabled,))
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -59,4 +59,4 @@ def admin_routes(config):
|
|||
def includeme(config):
|
||||
config.include(admin_routes, route_prefix=ADMIN_PREFIX)
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -46,4 +46,4 @@ def includeme(config):
|
|||
routing_links.connect_redirection_links(config)
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -50,4 +50,4 @@ def admin_routes(config):
|
|||
def includeme(config):
|
||||
config.include(admin_routes, route_prefix=ADMIN_PREFIX)
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -41,4 +41,4 @@ def includeme(config):
|
|||
pattern=ADMIN_PREFIX + '/password_reset_confirmation')
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -123,4 +123,4 @@ def includeme(config):
|
|||
pattern=ADMIN_PREFIX + '/my_account/test_channelstream')
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -38,4 +38,4 @@ def includeme(config):
|
|||
config.include(admin_routes, route_prefix=ADMIN_PREFIX + '/ops')
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ def includeme(config):
|
|||
pattern='/{repo_group_name:.*?[^/]}', repo_group_route=True)
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
||||
|
|
|
|||
19
rhodecode/apps/repo_group/views/__init__.py
Normal file
19
rhodecode/apps/repo_group/views/__init__.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2016-2017 RhodeCode GmbH
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License, version 3
|
||||
# (only), as published by the Free Software Foundation.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# This program is dual-licensed. If you wish to learn more about the
|
||||
# RhodeCode Enterprise Edition, including its added features, Support services,
|
||||
# and proprietary license terms, please see https://rhodecode.com/licenses/
|
||||
|
|
@ -384,4 +384,4 @@ def includeme(config):
|
|||
pattern='/{repo_name:.*?[^/]}', repo_route=True)
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -31,14 +31,4 @@ def includeme(config):
|
|||
pattern='/{repo_name:.*?[^/]}/search', repo_route=True)
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
|
||||
|
||||
# # FULL TEXT SEARCH
|
||||
# rmap.connect('search', '%s/search' % (ADMIN_PREFIX,),
|
||||
# controller='search')
|
||||
# rmap.connect('search_repo_home', '/{repo_name}/search',
|
||||
# controller='search',
|
||||
# action='index',
|
||||
# conditions={'function': check_repo},
|
||||
# requirements=URL_NAME_REQUIREMENTS)
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ def includeme(config):
|
|||
pattern='/_profiles/{username}')
|
||||
|
||||
# Scan module for configuration decorators.
|
||||
config.scan()
|
||||
config.scan('.views', ignore='.tests')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue