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

feat(target): Turn drain_one into a async method #2289

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

BuzzCutNorman
Copy link
Contributor

@BuzzCutNorman BuzzCutNorman commented Mar 7, 2024

This PR proposes adding the asyncio module to the target base. Change drain_one into an async method and call it via asyncio.run. The thought is drain_one spends alot of time on io tasks and the use of asyncio will free up some of that time.

I don't know how to resolve the pytest errors of:

pytest.PytestUnraisableExceptionWarning: Exception ignored in: <coroutine object Target.drain_one 

Any guidance or assistance on how best to resolve these error is much appreciated.


📚 Documentation preview 📚: https://meltano-sdk--2289.org.readthedocs.build/en/2289/

Copy link

codspeed-hq bot commented Mar 7, 2024

CodSpeed Performance Report

Merging #2289 will not alter performance

Comparing BuzzCutNorman:feat-target-asyncio-drain-one (e89c328) with main (26021c1)

Summary

✅ 6 untouched benchmarks

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 88.65%. Comparing base (26021c1) to head (e89c328).
Report is 40 commits behind head on main.

Files Patch % Lines
singer_sdk/target_base.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2289      +/-   ##
==========================================
- Coverage   88.76%   88.65%   -0.11%     
==========================================
  Files          54       54              
  Lines        4769     4770       +1     
  Branches      928      928              
==========================================
- Hits         4233     4229       -4     
- Misses        374      377       +3     
- Partials      162      164       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants