Sha256: 559972414529f0bc7aba0566671d17ae66794c8fc536ac8dc5172c8ad7c9e744

Contents?: true

Size: 440 Bytes

Versions: 8

Compression:

Stored size: 440 Bytes

Contents

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

module Reactor
  module Plans
    class CreateJob < CommonJob
      def initialize(*args)
        super()
        (name, x), options = separate_arguments(*args)
        @name = name || options[:name]
      end

      def prepare!
        error("name is nil") if @name.nil?
      end

      def migrate!
        Reactor::Cm::Job.create(@name, @params)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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