From f2830de25d690bdbf46f3de92335f8d36f4b7bf4 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 3 Dec 2024 04:57:48 +0000 Subject: [PATCH] fix: add missing await to asyncio.wait_for call in get_recent_rants The `asyncio.wait_for` call was missing an `await` keyword, causing the coroutine to be returned instead of awaited. This fix ensures the function properly awaits the executor result with the 15-second timeout. --- 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 7adbdca..cea36e9 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), 15) + rants = await asyncio.wait_for(loop.run_in_executor(None,get_rants), 15) page += 1 for rant in rants: