Module: Actions::Helpers::SmartProxySyncHelper

Instance Method Summary collapse

Instance Method Details

#schedule_async_repository_proxy_sync(repository) ⇒ Object



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

def schedule_async_repository_proxy_sync(repository)
  return unless Setting[:foreman_proxy_content_auto_sync]
  if SmartProxy.unscoped.pulpcore_proxies_with_environment(repository.environment).exists?
    ForemanTasks.async_task(::Actions::Katello::Repository::CapsuleSync, repository)
  end
end