Skip to content

Conversation

HaohanTsao
Copy link

Description

Converted fetch_group_emails in eaia/gmail.py to an async function to improve its performance and resolve the existing TODO comment. This change maintains all existing functionality while making the email fetching process asynchronous.

Changes Made

  • Modified fetch_group_emails to be an async function
  • Implemented run_in_executor for Gmail API calls to handle them asynchronously
  • Updated the email processing loop in run_ingest.py to use async iteration
  • Maintained all existing business logic and email processing features

Testing

  • Tested locally with existing Gmail integration
  • Verified that email fetching and processing work as expected
  • Confirmed compatibility with the existing Agent Inbox interface
  • No errors or issues observed during testing

Additional Notes

This change addresses the TODO comment: "This really should be async" in run_ingest.py

@HaohanTsao
Copy link
Author

Hi @hwchase17,

I wanted to check if this PR aligns with the project's goals before adding more test results and implementation details. The change focuses on improving email fetching performance for the main use case.

Would appreciate your thoughts on whether this change would be valuable for the primary use case. Happy to make any adjustments if needed!

Thanks for your time.

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.

1 participant