Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

Commit

Permalink
fix: metrics middleware scope check bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zac-li committed Jul 4, 2023
1 parent 7dd9073 commit ec43705
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lcserve/backend/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,8 @@ def __init__(
]

async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
if scope['path'] not in self.skip_routes:
# Not Scope obj has path key, e.g., lifespan type of scope
if scope.get('path', '') not in self.skip_routes:
timer = Timer(5)
shared_data = timer.SharedData(last_reported_time=time.perf_counter())
send_duration_task = asyncio.create_task(
Expand Down

0 comments on commit ec43705

Please sign in to comment.