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

Add setting to only process a limited number of objects per run (DBAI-51) #46

Merged
merged 4 commits into from
Apr 26, 2024

Conversation

ssciolla
Copy link
Collaborator

This PR aims to resolve DBAI-51.

@ssciolla ssciolla added enhancement New feature or request config Involves changes to the configuration file labels Apr 26, 2024
filtered_packages.map { |package| create_package_data_object(package) }
filtered_packages
.map { |package| create_package_data_object(package) }
.sort_by(&:stored_time)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As noted in the modified tests, my testing indicated that the order returned is ascending order by stored_date, but I've added this as a precaution. Batching would be severely broken (i.e. we'd miss packages) if the ordering changed, and the sort here seems like a low computation cost for at most hundreds of hashes/objects.

@ssciolla ssciolla marked this pull request as ready for review April 26, 2024 20:00
@ssciolla ssciolla merged commit 562614e into main Apr 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config Involves changes to the configuration file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants