Sha256: edb722b9471a0c8fd052686cfc6fbfdd1896adb93438661e204403c9838fe9ad

Contents?: true

Size: 657 Bytes

Versions: 27

Compression:

Stored size: 657 Bytes

Contents

module Actions
  module Middleware
    class LoadSettingValues < ::Dynflow::Middleware
      # ::Actions::Middleware::LoadSettingValues
      #
      # A middleware to ensure we load current setting values

      def delay(*args)
        reload_setting_values
        pass(*args)
      end

      def plan(*args)
        reload_setting_values
        pass(*args)
      end

      def run(*args)
        reload_setting_values
        pass(*args)
      end

      def finalize(*args)
        reload_setting_values
        pass(*args)
      end

      private

      def reload_setting_values
        ::Foreman.settings.load_values
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
foreman-tasks-5.1.1 app/lib/actions/middleware/load_setting_values.rb
foreman-tasks-5.1.0 app/lib/actions/middleware/load_setting_values.rb
foreman-tasks-4.1.5 app/lib/actions/middleware/load_setting_values.rb
foreman-tasks-4.1.4 app/lib/actions/middleware/load_setting_values.rb
foreman-tasks-4.1.3 app/lib/actions/middleware/load_setting_values.rb
foreman-tasks-5.0.0 app/lib/actions/middleware/load_setting_values.rb
foreman-tasks-4.1.2 app/lib/actions/middleware/load_setting_values.rb