Class: OodCore::Job::Adapters::Torque::FFI::BatchStatus
- Inherits:
-
FFI::ManagedStruct
- Object
- FFI::ManagedStruct
- OodCore::Job::Adapters::Torque::FFI::BatchStatus
- Defined in:
- lib/ood_core/job/adapters/torque/ffi.rb
Overview
Struct for PBS batch server status responses
Class Method Summary collapse
-
.release(ptr) ⇒ Object
Free memory for allocated BatchStatus C-linked list.
Instance Method Summary collapse
-
#to_h ⇒ Hash
Convert to hash describing this linked list.
Class Method Details
.release(ptr) ⇒ Object
Free memory for allocated OodCore::Job::Adapters::Torque::FFI::BatchStatus C-linked list
278 279 280 |
# File 'lib/ood_core/job/adapters/torque/ffi.rb', line 278 def self.release(ptr) pbs_statfree(ptr) end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash describing this linked list
284 285 286 287 288 289 290 291 292 |
# File 'lib/ood_core/job/adapters/torque/ffi.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 |