def init_app(app): if app.config.get("ENABLE_PROFILING"): endpoint_name = "profiling" service = ProfilingService(endpoint_name, backend=superdesk.get_backend()) ProfilingResource(endpoint_name, app=app, service=service) superdesk.privilege(name="profiling", label="Profiling Service", description="User can read profiling data.") profile.enable()
def init_app(app): if app.config.get('ENABLE_PROFILING'): endpoint_name = 'profiling' service = ProfilingService(endpoint_name, backend=superdesk.get_backend()) ProfilingResource(endpoint_name, app=app, service=service) superdesk.privilege(name='profiling', label='Profiling Service', description='User can read profiling data.') profile.enable()
def __enter__(self): if app.config.get('ENABLE_PROFILING'): profile.enable()
def __enter__(self): if app.config.get("ENABLE_PROFILING"): profile.enable()