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

ref: Make some functions that don't await non-async (RUF029) #4368

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

cbornet
Copy link
Collaborator

@cbornet cbornet commented Nov 3, 2024

Make some functions that don't await non-async (RUF029)

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 3, 2024
Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 3, 2024
@cbornet cbornet merged commit 10e1352 into langflow-ai:main Nov 3, 2024
37 of 39 checks passed
@cbornet cbornet deleted the remove-async branch November 3, 2024 16:42
@@ -82,7 +83,7 @@ async def get_current_user(
) -> User:
if token:
return await get_current_user_by_jwt(token, db)
user = await api_key_security(query_param, header_param, db)
user = await asyncio.to_thread(api_key_security, query_param, header_param, db)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Actually this is incorrect...
The db Session is not-thread-safe

ogabrielluiz pushed a commit that referenced this pull request Nov 4, 2024
Make some functions that don't await non-async (RUF029)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants