From 522465e0f8470f059142e09f0726fae83aab398b Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 3 Dec 2024 03:31:21 +0000 Subject: [PATCH] fix: increase timeout from 5 to 15 seconds for executor call in get_recent_rants The timeout passed to asyncio.wait_for for the run_in_executor call fetching rants was raised to 15 seconds to accommodate slower responses from the underlying dr.get_rants API call. --- src/drstats/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drstats/sync.py b/src/drstats/sync.py index 82b08b5..7adbdca 100644 --- a/src/drstats/sync.py +++ b/src/drstats/sync.py @@ -32,7 +32,7 @@ async def get_recent_rants(start_from=1, page_size=10): def get_rants(): return dr.get_rants("recent", page_size, start_from)["rants"] - rants = asyncio.wait_for(loop.run_in_executor(None,get_rants), 5) + rants = asyncio.wait_for(loop.run_in_executor(None,get_rants), 15) page += 1 for rant in rants: