Sha256: 0dd2e468f5f71d120184f3787ff50910b888ec6031f31839a944510ae86f6f26

Contents?: true

Size: 678 Bytes

Versions: 14

Compression:

Stored size: 678 Bytes

Contents

module InsightsCloud
  module Async
    class InsightsScheduledSync < ::Actions::EntryAction
      include ::Actions::RecurringAction

      def plan
        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

        plan_full_sync
      end

      def plan_full_sync
        plan_action(InsightsFullSync, Organization.unscoped.all)
      end

      def rescue_strategy_for_self
        Dynflow::Action::Rescue::Fail
      end

      def logger
        action_logger
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
foreman_rh_cloud-5.0.46 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.45 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.44 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.43 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-6.0.42.2 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-6.0.42.1 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-6.0.43 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.42 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-6.0.42 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.41 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.39 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.38 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.37 lib/insights_cloud/async/insights_scheduled_sync.rb
foreman_rh_cloud-5.0.36 lib/insights_cloud/async/insights_scheduled_sync.rb