Sha256: 0644c939d50afa7cb41f851a2b0d7cc8d88c23029dc1b1d0a10f1a5f38a62fc6

Contents?: true

Size: 527 Bytes

Versions: 40

Compression:

Stored size: 527 Bytes

Contents

module OodCore
  module Job
    class Task
      attr_reader :id, :status, :wallclock_time

      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

      def to_h
        {
          :id => id,
          :status => status,
          :wallclock_time => wallclock_time
        }
      end

      def ==(other)
        self.to_h == other.to_h
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
ood_core-0.26.1 lib/ood_core/job/task.rb
ood_core-0.25.0 lib/ood_core/job/task.rb
ood_core-0.24.2 lib/ood_core/job/task.rb
ood_core-0.24.1 lib/ood_core/job/task.rb
ood_core-0.24.0 lib/ood_core/job/task.rb
ood_core-0.23.5 lib/ood_core/job/task.rb
ood_core-0.23.4 lib/ood_core/job/task.rb
ood_core-0.23.3 lib/ood_core/job/task.rb
ood_core-0.23.2 lib/ood_core/job/task.rb
ood_core-0.23.1 lib/ood_core/job/task.rb
ood_core-0.23.0 lib/ood_core/job/task.rb
ood_core-0.22.0 lib/ood_core/job/task.rb
ood_core-0.21.0 lib/ood_core/job/task.rb
ood_core-0.20.2 lib/ood_core/job/task.rb
ood_core-0.20.1 lib/ood_core/job/task.rb
ood_core-0.20.0 lib/ood_core/job/task.rb
ood_core-0.19.0 lib/ood_core/job/task.rb
ood_core-0.18.1 lib/ood_core/job/task.rb
ood_core-0.18.0 lib/ood_core/job/task.rb
ood_core-0.17.6 lib/ood_core/job/task.rb