Sha256: 104e972c8127e2523246b48a4c5207988d0298f79373196d154499dce02dd511

Contents?: true

Size: 484 Bytes

Versions: 25

Compression:

Stored size: 484 Bytes

Contents

namespace :rh_cloud_insights do
  desc "Synchronize Insights inventory"
  task sync: :environment do
    if ! ENV['organization_id'].nil?
      organizations = [ Organization.where(:id => ENV['organization_id']).first ]
    else
      organizations = Organization.all
    end

    organizations.each do |organization|
      InventorySync::Async::InventoryFullSync.perform_now(organization)
      puts "Synchronized inventory for organization '#{organization.name}'"
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
foreman_rh_cloud-2.0.18.1 lib/tasks/insights.rake
foreman_rh_cloud-3.0.18.1 lib/tasks/insights.rake
foreman_rh_cloud-1.0.18 lib/tasks/insights.rake
foreman_rh_cloud-2.0.18 lib/tasks/insights.rake
foreman_rh_cloud-3.0.18 lib/tasks/insights.rake
foreman_rh_cloud-1.0.17 lib/tasks/insights.rake
foreman_rh_cloud-2.0.17 lib/tasks/insights.rake
foreman_rh_cloud-3.0.17 lib/tasks/insights.rake
foreman_rh_cloud-2.0.16 lib/tasks/insights.rake
foreman_rh_cloud-1.0.16 lib/tasks/insights.rake
foreman_rh_cloud-3.0.16 lib/tasks/insights.rake
foreman_rh_cloud-1.0.15 lib/tasks/insights.rake
foreman_rh_cloud-2.0.15 lib/tasks/insights.rake
foreman_rh_cloud-3.0.15 lib/tasks/insights.rake
foreman_rh_cloud-3.0.14 lib/tasks/insights.rake
foreman_rh_cloud-2.0.14 lib/tasks/insights.rake
foreman_rh_cloud-1.0.14 lib/tasks/insights.rake
foreman_rh_cloud-1.0.13.1 lib/tasks/insights.rake
foreman_rh_cloud-2.0.13.1 lib/tasks/insights.rake
foreman_rh_cloud-1.0.13 lib/tasks/insights.rake