##// END OF EJS Templates
celery: move pyramid app to celery init rather than per task run
dan -
r639:c5c553d9 default
parent child Browse files
Show More
@@ -108,10 +108,6 b' class RhodecodeCeleryTask(Task):'
108 108 log.debug('using celery proxy data to run task: %r', proxy_data)
109 109
110 110 from rhodecode.config.routing import make_map
111 from rhodecode.config.middleware import make_pyramid_app
112
113 # TODO: this can be done once per worker versus per task
114 pyramid_app = make_pyramid_app(config, **config['app_conf'])
115 111
116 112 request = Request.blank('/', environ=proxy_data['environ'])
117 113 request.user = AuthUser(user_id=proxy_data['auth_user']['user_id'],
@@ -86,3 +86,7 b' class PylonsLoader(BaseLoader):'
86 86 Import task modules.
87 87 """
88 88 self.import_default_modules()
89 from rhodecode.config.middleware import make_pyramid_app
90
91 # adding to self to keep a reference around
92 self.pyramid_app = make_pyramid_app(config, **config['app_conf'])
General Comments 0
You need to be logged in to leave comments. Login now