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

fix: make token retrieval in _get_auth asynchronous to prevent blocki… #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nimanikoo
Copy link

No description provided.

@Swolehokage
Copy link

@CodiumAI-Agent /describe
--pr_description.publish_labels=false
This pull request includes changes to the python/rtclient/__init__.py file to enhance the authentication process by making it asynchronous. The most important changes are:

Authentication process improvements:

  • Modified the _get_auth method to be asynchronous by adding the async keyword and using await for the get_token call. (python/rtclient/__init__.py)
  • Updated the connect method to await the _get_auth method, ensuring it handles asynchronous authentication properly. (python/rtclient/__init__.py)

@CodiumAI-Agent
Copy link

Title

fix: make token retrieval in _get_auth asynchronous to prevent blocki…


PR Type

Bug fix, Enhancement


Description

  • Converted the _get_auth method to an asynchronous function to prevent blocking the event loop, improving performance.
  • Updated the token retrieval process within _get_auth to use await, ensuring non-blocking execution.
  • Modified the connect method to await the _get_auth call, aligning with the asynchronous changes.

Changes walkthrough 📝

Relevant files
Enhancement
__init__.py
Make token retrieval asynchronous in `_get_auth` method   

python/rtclient/init.py

  • Made _get_auth method asynchronous to prevent blocking.
  • Updated token retrieval to use await for asynchronous execution.
  • Adjusted connect method to await _get_auth.
  • +5/-5     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    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.

    3 participants