From 6483da1751bce971e2141bcbaf7527b51373291a Mon Sep 17 00:00:00 2001 From: Aniket Maurya Date: Tue, 8 Oct 2024 18:25:01 +0530 Subject: [PATCH] aggregate requests (#328) --- src/litserve/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/litserve/server.py b/src/litserve/server.py index 3503deca..be2d5f19 100644 --- a/src/litserve/server.py +++ b/src/litserve/server.py @@ -308,7 +308,7 @@ async def data_streamer(self, q: deque, data_available: asyncio.Event, send_stat @property def active_requests(self): if self.track_requests and self.active_counters: - return self.active_counters[self.app.response_queue_id].value + return sum(counter.value for counter in self.active_counters) warnings.warn( "Active request counter is not enabled while using `on_request` callback hook. " "Please set track_requests=True in the LitServer."