mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-14 08:37:42 +00:00
fix: Fix number of concurrent requests in RequestLimiter (#3705)
This commit is contained in:
parent
82ad408a74
commit
12c264603e
@ -10,7 +10,7 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
class RequestLimiter:
|
class RequestLimiter:
|
||||||
def __init__(self, limit):
|
def __init__(self, limit):
|
||||||
self.semaphore = Semaphore(limit - 1)
|
self.semaphore = Semaphore(limit)
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user