Sha256: e5cfa763e152cde826bb1f5c9a94047e4a46cb40e8f1352085ea22f7f5feaf62

Contents?: true

Size: 935 Bytes

Versions: 43

Compression:

Stored size: 935 Bytes

Contents

module Actions
  module Helpers
    module WithContinuousOutput
      # @override
      # array of objects defining fill_continuous_input
      def continuous_output_providers
        []
      end

      def continuous_output
        continuous_output = ::ForemanTasks::ContinuousOutput.new
        continuous_output_providers.each do |continous_output_provider|
          continous_output_provider.fill_continuous_output(continuous_output)
        end
        continuous_output
      end

      def fill_planning_errors_to_continuous_output(continuous_output)
        execution_plan.errors.map do |e|
          case e.exception
          when ::Actions::ProxyAction::ProxyActionMissing
            continuous_output.add_output(e.message, 'debug', task.started_at)
          else
            continuous_output.add_exception(_('Failed to initialize'), e.exception, task.started_at)
          end
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
foreman-tasks-8.1.2 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-8.1.1 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-8.1.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-8.0.2 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-8.0.1 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-8.0.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-7.2.1 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-7.1.1 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-7.2.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-7.1.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-6.0.3 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-7.0.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-6.0.2 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-5.2.3 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-6.0.1 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-5.2.2 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-6.0.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-5.2.1 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-5.3.0 app/lib/actions/helpers/with_continuous_output.rb
foreman-tasks-5.2.0 app/lib/actions/helpers/with_continuous_output.rb