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

DMP-4744: Improve automated task - OutboundAudioDeleter #2648

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Ben-Edwards-cgi
Copy link
Contributor

Links

Jira

Change description

Summary of Git Diff

This Git diff introduces several changes to the OutboundAudioDeleterProcessorImpl.java, TransformedMediaRepository.java, and corresponding test files. The main focus is on modifying the way deletable transformed media is handled, specifically changing the return type of certain methods and improving error handling.

Highlights

  • Return Type Change:

    • The method findAllDeletableTransformedMedia in TransformedMediaRepository has been modified to return a list of Integer IDs instead of TransformedMediaEntity objects.
  • Improved Error Handling:

    • In the markForDeletion method of OutboundAudioDeleterProcessorImpl, the code now checks if a TransformedMediaEntity exists for each ID retrieved and logs an error if not found.
  • Use of HashSet:

    • The mediaRequests collection is now initialized as a HashSet to ensure uniqueness.
  • Refactoring of Media Processing Loop:

    • The iteration over transformedMediaList has been refactored to loop over IDs instead of entities, enhancing clarity and performance.
  • Test Adjustments:

    • Corresponding tests in OutboundAudioDeleterProcessorImplTest have been updated to match the new method signatures and ensure that the changes are properly tested, including mocking for the new return types.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[X] No

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