-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! [PR] Fixes #38048 - Add rolling content views
* Do not show ApplicableErrata on HostDetails page for rolling CVs, because for them applicable === installable errata * Move RollingRepoRefresh from sync into post-finalize async-task * Add humanized_name to rollingCV refresh * Fix Regenerate Applicability after RollingCV Refresh
- Loading branch information
Showing
6 changed files
with
90 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
module Actions | ||
module Helpers | ||
module RollingCVRepos | ||
def concerned_repos(repo) | ||
repo.root.repositories.in_environment(repo.environment).where( | ||
content_view_version: ::Katello::ContentViewVersion.where(content_view: ::Katello::ContentView.rolling) | ||
) | ||
end | ||
|
||
def update_rolling_content_views(repo) | ||
concurrence do | ||
repos = repo.root.repositories.in_environment(repo.environment).where( | ||
content_view_version: ::Katello::ContentViewVersion.where(content_view: ::Katello::ContentView.rolling) | ||
) | ||
|
||
repos.each do |rolling_repo| | ||
concerned_repos(repo).each do |rolling_repo| | ||
plan_action(::Actions::Katello::ContentView::RefreshRollingRepo, rolling_repo) | ||
end | ||
end | ||
end | ||
|
||
def update_rolling_content_views_async(repo) | ||
concerned_repos(repo).each do |rolling_repo| | ||
ForemanTasks.async_task(::Actions::Katello::ContentView::RefreshRollingRepo, rolling_repo) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters