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:
@@ -172,7 +172,9 @@ class Settings:
|
||||
database_url=database_url,
|
||||
bot_username=bot_username,
|
||||
mini_app_base_url=os.getenv("MINI_APP_BASE_URL", "").rstrip("/"),
|
||||
mini_app_short_name=(os.getenv("MINI_APP_SHORT_NAME", "") or "").strip().strip("/"),
|
||||
mini_app_short_name=(os.getenv("MINI_APP_SHORT_NAME", "") or "")
|
||||
.strip()
|
||||
.strip("/"),
|
||||
http_host=http_host,
|
||||
http_port=http_port,
|
||||
allowed_usernames=allowed,
|
||||
|
||||
Reference in New Issue
Block a user