Sha256: 668c376e5c5e521e40db902a6610700f653b083443698fe05a99b3e364c01143

Contents?: true

Size: 1.27 KB

Versions: 70

Compression:

Stored size: 1.27 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, :force_publication => true) 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

70 entries across 70 versions & 1 rubygems

Version Path
katello-4.14.2 app/lib/actions/katello/repository/finish_upload.rb
katello-4.14.1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.14.0 app/lib/actions/katello/repository/finish_upload.rb
katello-4.14.0.rc3 app/lib/actions/katello/repository/finish_upload.rb
katello-4.14.0.rc2 app/lib/actions/katello/repository/finish_upload.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.14.0.rc1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.13.1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.13.0 app/lib/actions/katello/repository/finish_upload.rb
katello-4.12.1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.13.0.rc1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.12.0 app/lib/actions/katello/repository/finish_upload.rb
katello-4.12.0.rc3 app/lib/actions/katello/repository/finish_upload.rb
katello-4.12.0.rc2 app/lib/actions/katello/repository/finish_upload.rb
katello-4.12.0.rc1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.11.1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.11.0 app/lib/actions/katello/repository/finish_upload.rb
katello-4.11.0.rc2 app/lib/actions/katello/repository/finish_upload.rb
katello-4.11.0.rc1 app/lib/actions/katello/repository/finish_upload.rb
katello-4.10.0 app/lib/actions/katello/repository/finish_upload.rb