mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-24 03:54:21 +01:00
index on db and read spent proofs from db (#370)
* index on db and read spent proofs from db * add benchmark for testing * remove benchmark * add option to disable cached secrets * disable python 3.9 tests
This commit is contained in:
@@ -8,8 +8,6 @@ from fastapi.exception_handlers import (
|
||||
)
|
||||
from fastapi.exceptions import RequestValidationError
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
# from fastapi_profiler import PyInstrumentProfilerMiddleware
|
||||
from loguru import logger
|
||||
from starlette.middleware import Middleware
|
||||
from starlette.middleware.cors import CORSMiddleware
|
||||
@@ -20,6 +18,9 @@ from ..core.settings import settings
|
||||
from .router import router
|
||||
from .startup import start_mint_init
|
||||
|
||||
if settings.debug_profiling:
|
||||
from fastapi_profiler import PyInstrumentProfilerMiddleware
|
||||
|
||||
# from starlette_context import context
|
||||
# from starlette_context.middleware import RawContextMiddleware
|
||||
|
||||
@@ -108,7 +109,9 @@ def create_app(config_object="core.settings") -> FastAPI:
|
||||
middleware=middleware,
|
||||
)
|
||||
|
||||
# app.add_middleware(PyInstrumentProfilerMiddleware)
|
||||
if settings.debug_profiling:
|
||||
assert PyInstrumentProfilerMiddleware is not None
|
||||
app.add_middleware(PyInstrumentProfilerMiddleware)
|
||||
|
||||
return app
|
||||
|
||||
|
||||
Reference in New Issue
Block a user