class OodCore::Job::Task

Attributes

id[R]
status[R]
wallclock_time[R]

Public Class Methods

new(id:, status:, wallclock_time: nil, **_) click to toggle source
# File lib/ood_core/job/task.rb, line 6
def initialize(id:, status:, wallclock_time: nil, **_)
  @id = id.to_s
  @status = OodCore::Job::Status.new(state: status)
  @wallclock_time = wallclock_time && wallclock_time.to_i
end

Public Instance Methods

==(other) click to toggle source
# File lib/ood_core/job/task.rb, line 20
def ==(other)
  self.to_h == other.to_h
end
to_h() click to toggle source
# File lib/ood_core/job/task.rb, line 12
def to_h
  {
    :id => id,
    :status => status,
    :wallclock_time => wallclock_time
  }
end