Module: Actions::Helpers::RollingCVRepos

Included in:
Katello::Repository::ImportUpload, Katello::Repository::Sync, Katello::Repository::UploadFiles
Defined in:
app/lib/actions/helpers/rolling_cv_repos.rb

Instance Method Summary collapse

Instance Method Details



4
5
6
7
8
# File 'app/lib/actions/helpers/rolling_cv_repos.rb', line 4

def find_related_rolling_repos(repo)
  repo.root.repositories.where(
    content_view_version: ::Katello::ContentViewVersion.where(content_view: ::Katello::ContentView.rolling)
  )
end

#update_rolling_content_views(repo) ⇒ Object



10
11
12
13
14
15
16
# File 'app/lib/actions/helpers/rolling_cv_repos.rb', line 10

def update_rolling_content_views(repo)
  concurrence do
    find_related_rolling_repos(repo).each do |rolling_repo|
      plan_action(::Actions::Katello::ContentView::RefreshRollingRepo, rolling_repo, true)
    end
  end
end

#update_rolling_content_views_async(repo, contents_changed) ⇒ Object



18
19
20
21
22
# File 'app/lib/actions/helpers/rolling_cv_repos.rb', line 18

def update_rolling_content_views_async(repo, contents_changed)
  find_related_rolling_repos(repo).each do |rolling_repo|
    ForemanTasks.async_task(::Actions::Katello::ContentView::RefreshRollingRepo, rolling_repo, contents_changed)
  end
end