refactor: improve code readability and structure in various components

- Refactored the `mini_app_short_name` assignment in `config.py` for better clarity.
- Enhanced the `app_config_js` function in `app.py` to improve formatting of the JavaScript response body.
- Added per-chat locks in `group_duty_pin.py` to prevent concurrent refreshes, improving message handling.
- Updated `_schedule_next_update` to include optional jitter for scheduling, enhancing performance during high-load scenarios.
- Cleaned up test files by removing unused imports and improving test descriptions for clarity.
This commit is contained in:
2026-03-03 17:52:23 +03:00
parent 37218a436a
commit 87e8417675
5 changed files with 142 additions and 63 deletions

View File

@@ -1,7 +1,6 @@
"""Tests for FastAPI app /api/duties."""
import time
from pathlib import Path
from unittest.mock import ANY, patch
import pytest