class PBS::Torque::BatchStatus

Struct for PBS batch server status responses

Public Class Methods

release(ptr) click to toggle source

Free memory for allocated {BatchStatus} C-linked list

# File lib/pbs/torque.rb, line 278
def self.release(ptr)
  pbs_statfree(ptr)
end

Public Instance Methods

to_h() click to toggle source

Convert to hash describing this linked list @return [Hash] hash describing linked list

# File lib/pbs/torque.rb, line 284
def to_h
  batch = self
  hash = {}
  until batch.to_ptr.null?
    hash[batch[:name]] = batch[:attribs].to_h
    batch = batch[:next]
  end
  hash
end