Fixing main page timeout value

This commit is contained in:
ZhymabekRoman 2024-04-08 22:01:49 +05:00
parent 04261921fd
commit 8aafabead7

View file

@ -28,7 +28,7 @@ async def render_postleter(limit: int = 30, as_html: bool = False):
outlet_posts_list = []
for post_id in random_post_id_list:
try:
post = MediumParser(post_id, timeout=config.TIMEOUT, host_address=config.HOST_ADDRESS, auth_cookies=config.MEDIUM_AUTH_COOKIES)
post = MediumParser(post_id, timeout=3, host_address=config.HOST_ADDRESS, auth_cookies=config.MEDIUM_AUTH_COOKIES)
await post.query(force_cache=True, retry=1)
post_metadata = await post.generate_metadata(as_dict=True)
outlet_posts_list.append(post_metadata)