ソースを参照

Fix call to rate-limiter

jherve 1 年間 前
コミット
6a583f66e8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/de_quoi_parle_le_monde/http.py

+ 2 - 2
src/de_quoi_parle_le_monde/http.py

@@ -16,8 +16,8 @@ class SemaphoreMixin:
 
 class RateLimiterMixin:
     async def _request(self, *args, **kwargs):
-        await self.limiter.acquire()
-        return await super()._request(*args, **kwargs)
+        async with self.limiter:
+            return await super()._request(*args, **kwargs)
 
 
 @define