Sha256: af70af9942dfbf5e58303ea330b3ebd219b9dc92c00323c96b1599f1a9d09d7a

Contents?: true

Size: 634 Bytes

Versions: 16

Compression:

Stored size: 634 Bytes

Contents

module ForemanTasks
  module Concerns
    module EnvironmentsExtension
      extend ActiveSupport::Concern

      included do
        alias_method_chain :obsolete_and_new, :dynflow
      end

      def obsolete_and_new_with_dynflow
        task = ForemanTasks.async_task(::Actions::Foreman::Puppetclass::Import,
                                       params)

        notice _("Added import task to queue, it will be run shortly")
        rescue ::Foreman::Exception => e
          error _("Failed to add task to queue: %s") % e.to_s
        ensure
          redirect_to :controller => controller_path
        end

    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
foreman-tasks-0.8.6 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.8.5 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.8.4 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.8.3 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.8.2 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.8.1 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.8.0 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.20 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.19 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.18 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.17 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.16 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.15 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.14 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.13 app/controllers/foreman_tasks/concerns/environments_extension.rb
foreman-tasks-0.7.12 app/controllers/foreman_tasks/concerns/environments_extension.rb