Skip to content

Commit

Permalink
Merge ca23cc2 into 246e913
Browse files Browse the repository at this point in the history
  • Loading branch information
rbikar committed Aug 11, 2021
2 parents 246e913 + ca23cc2 commit 14ed719
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions ubipop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ def populate_ubi_repos(self):
# multiple times, to avoid that, cache the content sets already used and skip the config
# whose content sets are all in the cache

awaited_repos_publishes = []

for config in sorted(self.ubiconfig_list, key=str):
content_sets = [
config.content_sets.rpm.output,
Expand Down Expand Up @@ -275,7 +277,7 @@ def populate_ubi_repos(self):
right_config = self._get_config(
repo_set.out_repos.rpm.ubi_config_version, config
)
UbiPopulateRunner(
repos_publishes = UbiPopulateRunner(
self.pulp,
self.pulp_client,
repo_set,
Expand All @@ -285,6 +287,13 @@ def populate_ubi_repos(self):
).run_ubi_population()

out_repos.update(repo_set.get_output_repo_ids())
# in case of dry-run there are no publications expected
if repos_publishes:
awaited_repos_publishes.extend(repos_publishes)

# wait until publication of all repos is finished
if awaited_repos_publishes:
f_sequence(awaited_repos_publishes).result()

if self.output_repos:
with open(self.output_repos, "w") as f:
Expand Down Expand Up @@ -722,8 +731,8 @@ def run_ubi_population(self):
(mdd_association,), (mdd_unassociation,)
)

# wait repo publication
f_sequence(self._publish_out_repos()).result()
# return list of futures with repo publishes
return self._publish_out_repos()

def _associate_unassociate_units(self, action_list):
fts = []
Expand Down

0 comments on commit 14ed719

Please sign in to comment.