fix: фиксы после рефакторинга
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import logging
|
||||
import os
|
||||
|
||||
import pydantic
|
||||
@@ -30,6 +31,10 @@ class DatabaseBase:
|
||||
self.config = config
|
||||
|
||||
async def connect(self) -> None:
|
||||
if self.config.ECHO:
|
||||
logging.getLogger('tortoise.db_client').setLevel(logging.DEBUG)
|
||||
logging.getLogger('tortoise').setLevel(logging.DEBUG)
|
||||
|
||||
await Tortoise.init(
|
||||
db_url=str(self.config.URL),
|
||||
modules={'models': ['src.domain', 'aerich.models']},
|
||||
|
||||
Reference in New Issue
Block a user