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:
callebtc
2023-11-26 06:07:38 -03:00
committed by GitHub
parent bff30d493d
commit fa5193cd8f
14 changed files with 253 additions and 164 deletions

View File

@@ -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