Sha256: 323daeaa6b6a8a6705948e56518e38d859677875f4716960503bcf4a8123a9ac

Contents?: true

Size: 572 Bytes

Versions: 8

Compression:

Stored size: 572 Bytes

Contents

require "reactor/cm/job"
require "reactor/plans/common_job"

module Reactor
  module Plans
    class UpdateJob < CommonJob
      def initialize(*args)
        super()

        (name,), options = separate_arguments(*args)
        @name = name || options[:name]
      end

      def prepapre!
        error("name is nil") if @name.nil?
        error("job #{@name} not found") unless Reactor::Cm::Job.exists?(@name)

        prepare_params!(nil)
      end

      def migrate!
        job = Reactor::Cm::Job.get(@name)
        migrate_params!(job)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
infopark_reactor-1.29.1 lib/reactor/plans/update_job.rb
infopark_reactor-1.29.0 lib/reactor/plans/update_job.rb
infopark_reactor-1.28.0 lib/reactor/plans/update_job.rb
infopark_reactor-1.27.0.rc10 lib/reactor/plans/update_job.rb
infopark_reactor-1.27.0.rc9 lib/reactor/plans/update_job.rb
infopark_reactor-1.27.0.rc8 lib/reactor/plans/update_job.rb
infopark_reactor-1.27.0.rc7 lib/reactor/plans/update_job.rb
infopark_reactor-1.27.0.rc4 lib/reactor/plans/update_job.rb