vvzvlad
f0e38b9776
perf(core): improve async handling and caching performance
...
Convert delayed_delete_file to async and use asyncio.sleep.
Add pre‑semaphore cache hit to serve cached files without acquiring the download semaphore.
Set SQLite busy_timeout to reduce lock errors.
Introduce a diagnostics counter for pending _persist_media_file_id_async tasks.
Refactor flag extraction to accept pre‑generated HTML and compute html body once.
Batch reply enrichment in RSS generator to minimize API calls.
Store cached messages directly in tg_cache and add fallback for legacy double‑pickle format.
BREAKING CHANGE: delayed_delete_file is now async and must be awaited.
2026-05-18 00:08:46 +03:00
vvzvlad
68a2dbfa04
refactor api_server and post_parser: implement asynchronous JSON file operations with locking mechanism to ensure thread safety, and streamline media file ID persistence logic
2025-09-13 20:47:16 +03:00
vvzvlad
521c3dc394
implement forceful termination in api_server and TelegramClient: add force_exit function for immediate process shutdown, update SIGTERM handler for forceful exit, and adjust restart logic in connection_handler to use SIGKILL
2025-06-10 14:28:51 +03:00
vvzvlad
d3366ca7ef
refactor tg_cache: update _get_history_from_cache to use max_age_hours instead of max_age_seconds, adjust cache expiration logic accordingly, and remove cache_ttl parameter from cached_get_chat_history
2025-06-10 14:17:16 +03:00
vvzvlad
688b9e1927
refactor tg_cache: update cache file naming convention to use a simpler format by removing '_history' from filename
2025-06-10 03:52:17 +03:00
vvzvlad
0dd4460e35
refactor tg_cache: simplify cache file path generation by removing limit from filename and updating related cache functions
2025-06-10 03:51:51 +03:00
vvzvlad
14081a3d44
refactor rss_generator and tg_cache: replace cached_get_chat with direct client.get_chat calls, update message caching logic to handle limits, and improve cache file naming for message history
2025-06-10 03:48:08 +03:00
vvzvlad
0f992bf3a8
enhance cache expiration logic in _get_from_cache: add randomness to max age check for improved cache validity
2025-06-10 03:28:43 +03:00
vvzvlad
95361be6f4
refactor tg_cache: change debug logs to info level for cache operations to enhance log clarity
2025-06-10 03:24:22 +03:00
vvzvlad
b7a8f4f60d
refactor requirements and rss_generator: replace direct get_chat calls with cached_get_chat for improved performance and update requirements.txt to uncomment Kurigram
2025-06-10 02:40:23 +03:00