Class: Actions::Katello::Host::RecalculateErrataStatus

Inherits:
Base
  • Object
show all
Defined in:
app/lib/actions/katello/host/recalculate_errata_status.rb

Instance Method Summary collapse

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
# File 'app/lib/actions/katello/host/recalculate_errata_status.rb', line 5

def run
  ::Host.unscoped.find_each do |host|
    host.content_facet.update_errata_status if host.content_facet.try(:uuid)
  rescue StandardError => error
    output[:errors] ||= []
    output[:errors] << (_("Error refreshing status for %s: ") % host.name) + error.message
  end
end