##// END OF EJS Templates
ae: Rely on fully prepared settings in appenlight wrapping function.
Martin Bornhold -
r594:71243b44 default
parent child Browse files
Show More
@@ -25,7 +25,6 b' middleware to handle appenlight publishi'
25 from appenlight_client import make_appenlight_middleware
25 from appenlight_client import make_appenlight_middleware
26 from appenlight_client.exceptions import get_current_traceback
26 from appenlight_client.exceptions import get_current_traceback
27 from appenlight_client.wsgi import AppenlightWSGIWrapper
27 from appenlight_client.wsgi import AppenlightWSGIWrapper
28 from paste.deploy.converters import asbool
29
28
30
29
31 def track_exception(environ):
30 def track_exception(environ):
@@ -50,7 +49,7 b' def track_extra_information(environ, sec'
50 environ['appenlight.extra'][section] = value
49 environ['appenlight.extra'][section] = value
51
50
52
51
53 def wrap_in_appenlight_if_enabled(app, config, appenlight_client=None):
52 def wrap_in_appenlight_if_enabled(app, settings, appenlight_client=None):
54 """
53 """
55 Wraps the given `app` for appenlight support.
54 Wraps the given `app` for appenlight support.
56
55
@@ -64,10 +63,10 b' def wrap_in_appenlight_if_enabled(app, c'
64 This is in use to support our setup of the vcs related middlewares.
63 This is in use to support our setup of the vcs related middlewares.
65
64
66 """
65 """
67 if asbool(config['app_conf'].get('appenlight')):
66 if settings['appenlight']:
68 app = RemoteTracebackTracker(app)
67 app = RemoteTracebackTracker(app)
69 if not appenlight_client:
68 if not appenlight_client:
70 app = make_appenlight_middleware(app, config)
69 app = make_appenlight_middleware(app, settings)
71 appenlight_client = app.appenlight_client
70 appenlight_client = app.appenlight_client
72 else:
71 else:
73 app = AppenlightWSGIWrapper(app, appenlight_client)
72 app = AppenlightWSGIWrapper(app, appenlight_client)
General Comments 0
You need to be logged in to leave comments. Login now