Sha256: 8ac512c44c1cb73ab80d05929080215c5d7c0a43c99a1785dd2709f4f7a2f446

Contents?: true

Size: 551 Bytes

Versions: 28

Compression:

Stored size: 551 Bytes

Contents

module InsightsCloud
  module Async
    class InsightsScheduledSync < ::ApplicationJob
      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

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

      def self.singleton_job_name
        name
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
foreman_rh_cloud-4.0.36 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.33 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.35 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.32 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.32 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.31 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.30 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.29 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.29 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.28 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.27 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.26 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.26 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.25.1 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.25 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.25 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.24.1 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.24.1 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.24 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-4.0.24 lib/insights_cloud/async/insights_scheduled_sync.rb