Sha256: 73f1c33f5eaf0478aaaadf97a880883c7fa205b2eaa1128d3bf0c5da37b5290f

Contents?: true

Size: 434 Bytes

Versions: 7

Compression:

Stored size: 434 Bytes

Contents

module Actions
  module ForemanPatch
    module Invocation
      class Reschedule < Actions::EntryAction

        def plan(invocation)
          action_subject(invocation)
          
          round = invocation.cycle.rounds.find_by(group: invocation.host.group)

          if round.nil?
            invocation.destroy
          else
            invocation.update!(round: round)
          end
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
foreman_patch-1.2.0.alpha1 app/lib/actions/foreman_patch/invocation/reschedule.rb
foreman_patch-1.1.6.alpha5 app/lib/actions/foreman_patch/invocation/reschedule.rb
foreman_patch-1.1.6.alpha4 app/lib/actions/foreman_patch/invocation/reschedule.rb
foreman_patch-1.1.5 app/lib/actions/foreman_patch/invocation/reschedule.rb
foreman_patch-1.1.4 app/lib/actions/foreman_patch/invocation/reschedule.rb
foreman_patch-1.1.3 app/lib/actions/foreman_patch/invocation/reschedule.rb
foreman_patch-1.1.1 app/lib/actions/foreman_patch/invocation/reschedule.rb