Skip to content

Commit

Permalink
SAT-19621 Scope Insights clean task as anonymous_admin (#888)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 authored Jun 17, 2024
1 parent 629ab94 commit 683e71a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tasks/insights.rake
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ namespace :rh_cloud_insights do
end

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

puts "Deleted #{deleted_count} insights statuses"
User.as_anonymous_admin do
deleted_count = cleaner.clean(hosts_search)
puts "Deleted #{deleted_count} insights statuses"
end
end

desc "Re-announce all organizations into Sources on RH cloud."
Expand Down

0 comments on commit 683e71a

Please sign in to comment.