Skip to content

Commit

Permalink
Fix some settings_config usages
Browse files Browse the repository at this point in the history
  • Loading branch information
ssciolla committed May 8, 2024
1 parent 0245cc6 commit 93127bc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions run_dark_blue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ def process_arch_instance(arch_config)
)

max_updated_at = @package_repo.get_max_updated_at_for_repository(arch_config.repository_name)
object_size_limit = @settings_config.object_size_limit
num_objects_per_repo = @settings_config.num_objects_per_repo
package_data_objs = arch_service.get_package_data_objects(
stored_date: max_updated_at,
**(@object_size_limit ? {package_filter: Archivematica::SizePackageFilter.new(@object_size_limit)} : {})
**(object_size_limit ? {package_filter: Archivematica::SizePackageFilter.new(object_size_limit)} : {})
)

if @settings.num_objects_per_repo && package_data_objs.length > @settings.num_objects_per_repo
package_data_objs = package_data_objs.take(@settings.num_objects_per_repo)
if num_objects_per_repo && package_data_objs.length > num_objects_per_repo
package_data_objs = package_data_objs.take(num_objects_per_repo)
end

package_data_objs.each do |package_data|
Expand Down

0 comments on commit 93127bc

Please sign in to comment.