class InsightsCloud::Async::InsightsScheduledSync

Public Class Methods

singleton_job_name() click to toggle source
# File lib/insights_cloud/async/insights_scheduled_sync.rb, line 18
def self.singleton_job_name
  name
end

Public Instance Methods

perform() click to toggle source
# File lib/insights_cloud/async/insights_scheduled_sync.rb, line 4
def perform
  unless Setting[:allow_auto_insights_sync]
    logger.debug(
      'The scheduled process is disabled due to the "allow_auto_insights_sync"
      setting being set to false.'
    )
    return
  end

  InsightsFullSync.perform_later()
ensure
  self.class.set(:wait => 24.hours).perform_later
end