Sha256: 4381d4eb96c12064a6ef21323f7916fec8f9a66a69084e83889f956a79ac906b
Contents?: true
Size: 736 Bytes
Versions: 59
Compression:
Stored size: 736 Bytes
Contents
module InsightsCloud module Async class InsightsClientStatusAging < ::Actions::EntryAction include ::Actions::RecurringAction def run host_ids = InsightsClientReportStatus.stale.reporting.pluck(:host_id) # update all stale records InsightsClientReportStatus.where(host_id: host_ids).update_all(status: InsightsClientReportStatus::NO_REPORT) # refresh global status Host.where(id: host_ids).preload(:host_statuses).find_in_batches do |hosts| hosts.each { |host| host.refresh_global_status! } end end def logger action_logger end def rescue_strategy_for_self Dynflow::Action::Rescue::Fail end end end end
Version data entries
59 entries across 59 versions & 1 rubygems