Sha256: 9f6a1a626129e822fa373a37eb9bbbe0b7592ea0737522b2997e6ef42fc8cb4d

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

module Fasten
  class Task
    include Fasten::Logger
    include Fasten::State

    attr_accessor :name, :after, :shell, :ruby
    attr_accessor :dependants, :depends, :request, :response, :worker, :run_score

    def initialize(name: nil, shell: nil, ruby: nil, request: nil, after: nil)
      self.name = name
      self.after = after
      self.shell = shell
      self.ruby = ruby
      self.request = request
    end

    def marshal_dump
      [@name, @state, @ini, @fin, @dif, @request, @response, @shell, @ruby, @error]
    end

    def marshal_load(data)
      @name, @state, @ini, @fin, @dif, @request, @response, @shell, @ruby, @error = data
    end

    def to_s
      name
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fasten-0.5.4 lib/fasten/task.rb