Skip to content

Commit

Permalink
Fixes #35169 - Call Pulp RefreshIfNeeded concurrently (#10188)
Browse files Browse the repository at this point in the history
During manifest refresh, call pulp refresh repos concurrently
to leverage pulp tasking system to execute the independent pulp tasks.

Limit the level of concurrency by batches likewise Capsule sync, due to
similar scalability reasons.

Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
  • Loading branch information
pmoravec authored Jul 8, 2022
1 parent a9f5c2c commit fccabdf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/lib/actions/katello/organization/manifest_refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ def plan(organization)

def plan_refresh_repos(import_products_action, org)
repositories = ::Katello::Repository.in_default_view.in_product(::Katello::Product.redhat.in_org(org))
repositories.each do |repo|
plan_action(Katello::Repository::RefreshRepository,
repo,
:dependency => import_products_action.output)
repositories.in_groups_of(Setting[:foreman_proxy_content_batch_size], false) do |repo_batch|
concurrence do
repo_batch.each do |repo|
plan_action(Katello::Repository::RefreshRepository,
repo,
:dependency => import_products_action.output)
end
end
end
end

Expand Down

0 comments on commit fccabdf

Please sign in to comment.