Project

General

Profile

« Previous | Next » 

Revision c5a25d9f

Added by Stephen Benjamin almost 6 years ago

fixes #24068 - correctly remove schedules for repos

Schedules are not currently correctly removed from pulp. We update the
product to disassociate the sync plan, but the object needs to be
reloaded otherwise sync_plan_id is still set when it gets sent to the
Pulp::Repos::Update action.

View differences:

lib/katello/tasks/repository.rake
end
end
desc "Refresh pulp sync schedules"
task :refresh_sync_schedule => ["environment", "check_ping"] do
User.current = User.anonymous_api_admin
Katello::Product.all.each do |product|
puts "Updating #{product}"
ForemanTasks.sync_task(::Actions::Pulp::Repos::Update, product)
end
end
def lookup_repositories
lifecycle_envs = Katello::KTEnvironment.where(:name => ENV['LIFECYCLE_ENVIRONMENT']) if ENV['LIFECYCLE_ENVIRONMENT']
content_views = Katello::ContentView.where(:name => ENV['CONTENT_VIEW']) if ENV['CONTENT_VIEW']

Also available in: Unified diff