Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies - Feb 2024 #57

Merged

Conversation

ThorntonMatthewD
Copy link
Collaborator

Description

The middleware workaround was put in place due to an issue where calling await req.body() within middleware would cause the thread to become blocking. This would cause Starlette to throw and exception. This is no longer an issue and can safely be removed.
@ThorntonMatthewD ThorntonMatthewD force-pushed the update-dependencies-feb-2024 branch from c591afb to b9799c7 Compare February 5, 2024 22:25
@allella allella requested a review from oliviasculley February 5, 2024 22:27
Copy link
Member

@oliviasculley oliviasculley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time to reorganize hg labs into a logistics provider because we need to 🚢 it!

@API.middleware("http")
async def rate_limit_check_api(
req: Request, call_next: Callable[[Request], Awaitable[None]]
):
"""Looks to see if /check_api has been run recently, and returns an error if so."""
req_body = await get_body(req)
req_body = await req.body()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish there was a chef's kiss emoji for this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It felt so good to rip that out, oh my gosh!

{ name = "Olivia Sculley", email = "[email protected]" },
]
keywords = [
"automation",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't mean to reformat this entire file. I was fighting with my autolinter hard, and I think it won.

@ThorntonMatthewD ThorntonMatthewD merged commit 5e03c31 into hackgvl:dev Feb 5, 2024
1 check passed
@ThorntonMatthewD ThorntonMatthewD deleted the update-dependencies-feb-2024 branch February 5, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants