Sha256: ad77e7092dcf7b2e4638888ef1c09b625a8de11d8c76f098861b9744804c4dad

Contents?: true

Size: 674 Bytes

Versions: 23

Compression:

Stored size: 674 Bytes

Contents

namespace :rh_cloud_insights do
  desc "Synchronize Insights hosts hits"
  task sync: [:environment, 'dynflow:client'] do
    ForemanTasks.sync_task(InsightsCloud::Async::InsightsFullSync)
    puts "Synchronized Insights hosts hits data"
  end

  desc "Remove insights client report statuses by searching on host criteria"
  task clean_statuses: [:environment] do
    hosts_search = ENV['SEARCH']

    if hosts_search.empty?
      puts 'Must specify SEARCH= criteria for hosts search'
      next
    end

    cleaner = ForemanRhCloud::InsightsStatusCleaner.new
    deleted_count = cleaner.clean(hosts_search)

    puts "Deleted #{deleted_count} insights statuses"
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
foreman_rh_cloud-4.0.36 lib/tasks/insights.rake
foreman_rh_cloud-3.0.33 lib/tasks/insights.rake
foreman_rh_cloud-4.0.35 lib/tasks/insights.rake
foreman_rh_cloud-3.0.32 lib/tasks/insights.rake
foreman_rh_cloud-4.0.32 lib/tasks/insights.rake
foreman_rh_cloud-5.0.32 lib/tasks/insights.rake
foreman_rh_cloud-4.0.31 lib/tasks/insights.rake
foreman_rh_cloud-5.0.31 lib/tasks/insights.rake
foreman_rh_cloud-5.0.30 lib/tasks/insights.rake
foreman_rh_cloud-4.0.30 lib/tasks/insights.rake
foreman_rh_cloud-3.0.29 lib/tasks/insights.rake
foreman_rh_cloud-4.0.29 lib/tasks/insights.rake
foreman_rh_cloud-5.0.29 lib/tasks/insights.rake
foreman_rh_cloud-3.0.28 lib/tasks/insights.rake
foreman_rh_cloud-5.0.28 lib/tasks/insights.rake
foreman_rh_cloud-4.0.27 lib/tasks/insights.rake
foreman_rh_cloud-3.0.26 lib/tasks/insights.rake
foreman_rh_cloud-4.0.26 lib/tasks/insights.rake
foreman_rh_cloud-4.0.25.1 lib/tasks/insights.rake
foreman_rh_cloud-3.0.25 lib/tasks/insights.rake