Browse Source

Fix call to rate-limiter

jherve 1 year ago
parent
commit
6a583f66e8
1 changed files with 2 additions and 2 deletions
  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