DMP-4744: Improve automated task - OutboundAudioDeleter #2648
+24
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Links
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:
findAllDeletableTransformedMedia
inTransformedMediaRepository
has been modified to return a list ofInteger
IDs instead ofTransformedMediaEntity
objects.Improved Error Handling:
markForDeletion
method ofOutboundAudioDeleterProcessorImpl
, the code now checks if aTransformedMediaEntity
exists for each ID retrieved and logs an error if not found.Use of HashSet:
mediaRequests
collection is now initialized as aHashSet
to ensure uniqueness.Refactoring of Media Processing Loop:
transformedMediaList
has been refactored to loop over IDs instead of entities, enhancing clarity and performance.Test Adjustments:
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")