Sha256: 3ac435a6f7f88a692cb8c17f50d8819eae4d38d313b5c26adb5152ff1160413e

Contents?: true

Size: 543 Bytes

Versions: 34

Compression:

Stored size: 543 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

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

      def self.singleton_job_name
        name
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
foreman_rh_cloud-3.0.19 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-2.0.18.1 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.18.1 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-1.0.18 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-2.0.18 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.18 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-1.0.17 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-2.0.17 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.17 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-2.0.16 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-1.0.16 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.16 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-1.0.15 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-2.0.15 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.15 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-3.0.14 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-2.0.14 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-1.0.14 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-0.9.14 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-0.9.13.1 lib/insights_cloud/async/insights_scheduled_sync.rb