Sha256: 1e6abe66483bb4731f3e8ac406979f689818545ec34d7e2ad5cedd497a200d84

Contents?: true

Size: 343 Bytes

Versions: 21

Compression:

Stored size: 343 Bytes

Contents

class Jets::Job::Task < Jets::Lambda::Task
  attr_reader :state
  def initialize(class_name, meth, options={})
    super
    @rate = options[:rate]
    @cron = options[:cron]
    @state = options[:state] || 'ENABLED'
  end

  def schedule_expression
    if @rate
      "rate(#{@rate})"
    elsif @cron
      "cron(#{@cron})"
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
jets-0.7.1 lib/jets/job/task.rb
jets-0.7.0 lib/jets/job/task.rb
jets-0.6.9 lib/jets/job/task.rb
jets-0.6.8 lib/jets/job/task.rb
jets-0.6.7 lib/jets/job/task.rb
jets-0.6.6 lib/jets/job/task.rb
jets-0.6.5 lib/jets/job/task.rb
jets-0.6.4 lib/jets/job/task.rb
jets-0.6.3 lib/jets/job/task.rb
jets-0.6.2 lib/jets/job/task.rb
jets-0.6.1 lib/jets/job/task.rb
jets-0.6.0 lib/jets/job/task.rb
jets-0.5.8 lib/jets/job/task.rb
jets-0.5.7 lib/jets/job/task.rb
jets-0.5.6 lib/jets/job/task.rb
jets-0.5.5 lib/jets/job/task.rb
jets-0.5.4 lib/jets/job/task.rb
jets-0.5.3 lib/jets/job/task.rb
jets-0.5.2 lib/jets/job/task.rb
jets-0.5.1 lib/jets/job/task.rb