fix(batch_processor): fix batch processor#7798
fix(batch_processor): fix batch processor#7798leandrodamascena merged 3 commits intoaws-powertools:developfrom
Conversation
|
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
The change to BasePartialProcessor.async_process() in commit d08711f causes the method to create a new loop on every invocation. This is because asyncio.get_running_loop() raises RuntimeError also when the thread has an event loop, since the loop is no longer running after loop.run_until_complete() terminates.
152d9c0 to
c3df3ad
Compare
|
Hi @exg, thank you so much for opening this PR! I'm attending an external event today and will review this PR ASAP. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7798 +/- ##
========================================
Coverage 96.52% 96.52%
========================================
Files 275 275
Lines 13123 13123
Branches 990 990
========================================
Hits 12667 12667
Misses 353 353
Partials 103 103 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
|



Issue number: closes #7792
Summary
The PR fixes a regression in the batch processor.
Changes
The change to BasePartialProcessor.async_process() in commit d08711f causes the method to create a new loop on every invocation. This is because asyncio.get_running_loop() raises RuntimeError also when the thread has an event loop, since the loop is no longer running after loop.run_until_complete() terminates.
User experience
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.