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:
@@ -5,6 +5,7 @@ import time
|
||||
from contextlib import asynccontextmanager
|
||||
from typing import Optional, Union
|
||||
|
||||
from loguru import logger
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy_aio.base import AsyncConnection
|
||||
from sqlalchemy_aio.strategy import ASYNCIO_STRATEGY # type: ignore
|
||||
@@ -130,7 +131,7 @@ class Database(Compat):
|
||||
# )
|
||||
else:
|
||||
if not os.path.exists(self.db_location):
|
||||
print(f"Creating database directory: {self.db_location}")
|
||||
logger.info(f"Creating database directory: {self.db_location}")
|
||||
os.makedirs(self.db_location)
|
||||
self.path = os.path.join(self.db_location, f"{self.name}.sqlite3")
|
||||
database_uri = f"sqlite:///{self.path}"
|
||||
|
||||
Reference in New Issue
Block a user