diff --git a/rhodecode/apps/svn_support/utils.py b/rhodecode/apps/svn_support/utils.py --- a/rhodecode/apps/svn_support/utils.py +++ b/rhodecode/apps/svn_support/utils.py @@ -63,6 +63,7 @@ def generate_mod_dav_svn_config(registry trigger(ModDavSvnConfigChange(), registry) return file_path + def _render_mod_dav_svn_config( parent_path_root, list_parent_path, location_root, repo_groups, realm, use_ssl, template): diff --git a/rhodecode/lib/celerylib/loader.py b/rhodecode/lib/celerylib/loader.py --- a/rhodecode/lib/celerylib/loader.py +++ b/rhodecode/lib/celerylib/loader.py @@ -23,6 +23,8 @@ Celery loader, run with:: celery worker \ --task-events \ --beat \ + --autoscale=20,2 \ + --max-tasks-per-child 1 \ --app rhodecode.lib.celerylib.loader \ --scheduler rhodecode.lib.celerylib.scheduler.RcScheduler \ --loglevel DEBUG --ini=.dev/dev.ini @@ -135,12 +137,16 @@ def on_preload_parsed(options, **kwargs) ini_file_glob = ini_location log.debug('Bootstrapping RhodeCode application...') + + env = {} try: env = bootstrap(ini_location, options=options) except Exception: log.exception('Failed to bootstrap RhodeCode APP') + log.debug('Got Pyramid ENV: %s', env) celery_settings = get_celery_config(env['registry'].settings) + setup_celery_app( app=env['app'], root=env['root'], request=env['request'], registry=env['registry'], closer=env['closer'], diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -43,7 +43,6 @@ import pkg_resources from webhelpers2.text import collapse, remove_formatting from mako import exceptions from pyramid.threadlocal import get_current_registry -from rhodecode.lib.request import Request from rhodecode.lib.vcs.backends.base import Config from rhodecode.lib.vcs.exceptions import VCSError diff --git a/rhodecode/lib/utils2.py b/rhodecode/lib/utils2.py --- a/rhodecode/lib/utils2.py +++ b/rhodecode/lib/utils2.py @@ -779,7 +779,6 @@ class AttributeDict(AttributeDictBase): return self.get(attr, None) - class OrderedDefaultDict(collections.OrderedDict, collections.defaultdict): def __init__(self, default_factory=None, *args, **kwargs): # in python3 you can omit the args to super