Class: Oxidized::Job

Inherits:
Thread
  • Object
show all
Defined in:
lib/oxidized/job.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Job

Returns a new instance of Job.



4
5
6
7
8
9
10
11
12
# File 'lib/oxidized/job.rb', line 4

def initialize node
  @node         = node
  @start        = Time.now.utc
  super do |node|
    @status, @config = node.run
    @end             = Time.now.utc
    @time            = @end - @start
  end
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



3
4
5
# File 'lib/oxidized/job.rb', line 3

def config
  @config
end

#endObject (readonly)

Returns the value of attribute end.



3
4
5
# File 'lib/oxidized/job.rb', line 3

def end
  @end
end

#nodeObject (readonly)

Returns the value of attribute node.



3
4
5
# File 'lib/oxidized/job.rb', line 3

def node
  @node
end

#startObject (readonly)

Returns the value of attribute start.



3
4
5
# File 'lib/oxidized/job.rb', line 3

def start
  @start
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/oxidized/job.rb', line 3

def status
  @status
end

#timeObject (readonly)

Returns the value of attribute time.



3
4
5
# File 'lib/oxidized/job.rb', line 3

def time
  @time
end