Sha256: 91a446f48d5bbe19f695297104dfc6d3e53ca4e3805658d383cd236dbacff44a
Contents?: true
Size: 1.24 KB
Versions: 47
Compression:
Stored size: 1.24 KB
Contents
module Actions module Katello module Repository class FinishUpload < Actions::Base def plan(repository, options = {}) import_upload_task = options.fetch(:import_upload_task, nil) upload_actions = options.fetch(:upload_actions, nil) content_type = options.fetch(:content_type) if content_type unit_type_id = SmartProxy.pulp_primary.content_service(content_type)::CONTENT_TYPE else content_type = repository.content_type unit_type_id = SmartProxy.pulp_primary.content_service(content_type)::CONTENT_TYPE end generate_metadata = options.fetch(:generate_metadata, true) plan_action(Katello::Repository::MetadataGenerate, repository, :dependency => import_upload_task) if generate_metadata recent_range = 5.minutes.ago.utc.iso8601 plan_action(Katello::Repository::FilteredIndexContent, id: repository.id, filter: {:association => {:created => {"$gt" => recent_range}}}, content_type: unit_type_id, import_upload_task: import_upload_task, upload_actions: upload_actions) end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems