- Added `ca-certificates` installation to Dockerfile for improved network security. - Updated health check command in Dockerfile to include better timeout handling. - Refactored `run_helper.py` to implement proper signal handling and logging during shutdown. - Transitioned database operations to an asynchronous model in `async_db.py`, improving performance and responsiveness. - Updated database schema to support new foreign key relationships and optimized indexing for better query performance. - Enhanced various bot handlers to utilize async database methods, improving overall efficiency and user experience. - Removed obsolete database and fix scripts to streamline the project structure.
27 lines
1.0 KiB
Python
27 lines
1.0 KiB
Python
"""
|
||
Пакет для работы с базой данных.
|
||
|
||
Содержит:
|
||
- models: модели данных
|
||
- base: базовый класс для работы с БД
|
||
- repositories: репозитории для разных сущностей
|
||
- repository_factory: фабрика репозиториев
|
||
- async_db: основной класс AsyncBotDB
|
||
"""
|
||
|
||
from .models import (
|
||
User, BlacklistUser, UserMessage, TelegramPost, PostContent,
|
||
MessageContentLink, Admin, Migration, AudioMessage, AudioListenRecord, AudioModerate
|
||
)
|
||
from .repository_factory import RepositoryFactory
|
||
from .base import DatabaseConnection
|
||
from .async_db import AsyncBotDB
|
||
|
||
# Для обратной совместимости экспортируем старый интерфейс
|
||
__all__ = [
|
||
'User', 'BlacklistUser', 'UserMessage', 'TelegramPost', 'PostContent',
|
||
'MessageContentLink', 'Admin', 'Migration', 'AudioMessage', 'AudioListenRecord', 'AudioModerate',
|
||
'RepositoryFactory', 'DatabaseConnection', 'AsyncBotDB'
|
||
]
|
||
|