Enhance bot functionality and refactor database interactions
- 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.
This commit is contained in:
@@ -31,9 +31,9 @@ def setup_test_mocks():
|
||||
env_patcher = patch('os.getenv', side_effect=mock_getenv)
|
||||
env_patcher.start()
|
||||
|
||||
# Мокаем BotDB
|
||||
# Мокаем AsyncBotDB
|
||||
mock_db = Mock()
|
||||
db_patcher = patch('helper_bot.utils.base_dependency_factory.BotDB', mock_db)
|
||||
db_patcher = patch('helper_bot.utils.base_dependency_factory.AsyncBotDB', mock_db)
|
||||
db_patcher.start()
|
||||
|
||||
return env_patcher, db_patcher
|
||||
|
||||
Reference in New Issue
Block a user