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

Specifies the affected components (PDF Extractor and HTTP Executor) #15641

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

Conversation

chowyu12
Copy link

Summary

  1. In pdf_extractor.py:
  • Added nested try/finally blocks to ensure proper resource cleanup
  • Improved error handling for PDF document processing
  • Added proper cleanup for text_page and page objects
  • Ensured resources are released in the correct order: text_page → page → pdf_reader
  1. In executor.py:
  • Added proper HTTP connection management using context managers
  • Improved file resource handling in binary data processing
  • Added response cleanup in error cases
  • Enhanced error handling with proper resource cleanup
  • Added connection pooling for better resource management

These changes address potential memory leaks by ensuring proper resource cleanup and improving error handling across both files.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 💪 enhancement New feature or request labels Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant