Commit Graph

353 Commits

Author SHA1 Message Date
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 d6c3725b02 implement graceful shutdown in api_server: add SIGTERM handler for proper termination and enhance error handling for server startup issues 2025-06-10 14:06:56 +03:00
vvzvlad 2c9ebf139f refactor connection_handler in TelegramClient: increase wait time to 5 seconds before restart, implement process termination and forking for more reliable restarts 2025-06-10 03:58:33 +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 223ae57929 add delay in connection_handler to ensure resources are freed before process restart 2025-06-10 03:38:33 +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 c94090c4b5 update _on_disconnect method in TelegramClient: change to async for better handling of disconnections 2025-06-10 03:25:54 +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
vvzvlad 0999e86f2b add timing logs for RSS and HTML generation in api_server and rss_generator 2025-04-27 18:40:31 +04:00
vvzvlad be28a11db6 implement connection handling in TelegramClient: add disconnect tracking and application restart on multiple disconnections 2025-04-27 18:31:29 +04:00
vvzvlad f499dc56a7 refactor api_server: comment out redundant log for cached media files 2025-04-27 18:22:31 +04:00
vvzvlad 45e9ac7a1e refactor post_parser: add line breaks for improved readability in post content 2025-04-27 13:06:39 +04:00
vvzvlad e0bb640a73 refactor post_parser: enhance post text and poll formatting, improve HTML structure 2025-04-26 13:15:03 +04:00
vvzvlad 508be049d9 refactor post_parser: streamline content body construction for improved readability 2025-04-26 12:55:38 +04:00
vvzvlad 36236d4407 refactor post_parser: clean up whitespace and improve PDF placeholder handling 2025-04-26 12:52:18 +04:00
vvzvlad 1bd36b32d8 refactor post_parser: wrap media content in a div for better HTML structure 2025-04-26 12:51:37 +04:00
vvzvlad c340d22fc4 improve error logging 2025-04-26 12:46:22 +04:00
vvzvlad 721302d2e6 oops 2025-04-26 12:42:27 +04:00
vvzvlad b9d5e839df refactor post_parser and rss_generator:move media in body render 2025-04-26 12:38:52 +04:00
vvzvlad e9949a7eab update pylint configurations in test 2025-04-26 02:34:08 +04:00
vvzvlad 58253e15e0 add test for get_all_possible_flags 2025-04-26 02:31:16 +04:00
vvzvlad 422a3925ff fix bug 2025-04-25 16:59:21 +04:00
vvzvlad db0d1a6dc2 refactor _generate_html_body to streamline reply info handling and improve logging 2025-04-20 19:07:30 +03:00
vvzvlad 5c34d62c11 EPIC: support REPLY_TO in rss 2025-04-19 04:49:01 +03:00
vvzvlad 80d6cc5d5a add line break in debug HTML 2025-04-19 04:33:47 +03:00
vvzvlad 65a69ed37a refactoring 2025-04-19 04:32:44 +03:00
vvzvlad 4e1987983f refactoring 2025-04-19 04:11:02 +03:00
vvzvlad 2f7f524e83 remove unnecessary line breaks in forwarded message HTML output 2025-04-19 04:03:14 +03:00
vvzvlad c2bbf72b07 refactor _format_forward_info to handle multiple forward cases and improve logging 2025-04-19 04:01:52 +03:00
vvzvlad 5d4951aecd update comment in post_parser.py to clarify main cut logic 2025-04-19 03:55:03 +03:00
vvzvlad 3ab2027c4c add calls map 2025-04-19 03:52:46 +03:00
vvzvlad 1e283c4249 fix bug 2025-04-19 03:50:33 +03:00
vvzvlad 97ad18e9d4 remove unused 2025-04-19 00:01:21 +03:00
vvzvlad ce39431998 move import 2025-04-18 23:34:26 +03:00
vvzvlad 386e7e8ce4 improve logging 2025-04-18 23:33:47 +03:00
vvzvlad 26744e3699 refactoring 2025-04-18 23:02:29 +03:00
vvzvlad d2870bc0f6 add youtube title 2025-04-18 22:58:25 +03:00
vvzvlad d0584d4525 more logging 2025-04-18 21:52:17 +03:00
vvzvlad ba20f2ee02 add logs 2025-04-18 21:43:56 +03:00
vvzvlad 87822c0d51 add message id debug 2025-04-18 21:34:41 +03:00
vvzvlad 045360d497 debug print 2025-04-18 21:28:15 +03:00
vvzvlad 5aa5783672 format fix 2025-04-18 21:25:45 +03:00
vvzvlad fe1fee242d fix local req logic 2025-04-18 21:15:35 +03:00
vvzvlad 8c0a88cb84 small fix 2025-04-18 21:10:59 +03:00
vvzvlad 27f39a3948 add processed_message_to_tg_message for merge flags 2025-04-18 21:08:20 +03:00
vvzvlad 3f253b7a0e add template 2025-04-18 21:05:16 +03:00
vvzvlad 8321844a3e refactoring 2025-04-18 20:57:48 +03:00