Class: TaskJuggler::JobInfo
Overview
The JobInfo class is just a storage container for some batch job related pieces of information. It contains things like a job id, the process id, the stdout data and the like.
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#jobId ⇒ Object
readonly
Returns the value of attribute jobId.
-
#pid ⇒ Object
Returns the value of attribute pid.
-
#retVal ⇒ Object
Returns the value of attribute retVal.
-
#stderr ⇒ Object
Returns the value of attribute stderr.
-
#stderrC ⇒ Object
Returns the value of attribute stderrC.
-
#stderrEOT ⇒ Object
Returns the value of attribute stderrEOT.
-
#stderrP ⇒ Object
Returns the value of attribute stderrP.
-
#stdout ⇒ Object
Returns the value of attribute stdout.
-
#stdoutC ⇒ Object
Returns the value of attribute stdoutC.
-
#stdoutEOT ⇒ Object
Returns the value of attribute stdoutEOT.
-
#stdoutP ⇒ Object
Returns the value of attribute stdoutP.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(jobId, block, tag) ⇒ JobInfo
constructor
A new instance of JobInfo.
- #openPipes ⇒ Object
Constructor Details
#initialize(jobId, block, tag) ⇒ JobInfo
Returns a new instance of JobInfo.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 28 def initialize(jobId, block, tag) # The job id. A unique number that is used by the BatchProcessor objects # to indentify jobs. @jobId = jobId # This the the block of code to be run as external process. @block = block # The tag can really be anything that the user of BatchProcessor needs # to uniquely identify the job. @tag = tag # The pipe to transfer stdout data from the child to the parent. @stdoutP, @stdoutC = nil # The stdout output of the child @stdout = '' # This flag is set to true when the EOT character has been received. @stdoutEOF = false # The pipe to transfer stderr data from the child to the parent. @stderrP, @stderrC = nil # The stderr output of the child @stderr = '' # This flag is set to true when the EOT character has been received. @stderrEOT = false end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
24 25 26 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 24 def block @block end |
#jobId ⇒ Object (readonly)
Returns the value of attribute jobId.
24 25 26 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 24 def jobId @jobId end |
#pid ⇒ Object
Returns the value of attribute pid.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def pid @pid end |
#retVal ⇒ Object
Returns the value of attribute retVal.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def retVal @retVal end |
#stderr ⇒ Object
Returns the value of attribute stderr.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stderr @stderr end |
#stderrC ⇒ Object
Returns the value of attribute stderrC.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stderrC @stderrC end |
#stderrEOT ⇒ Object
Returns the value of attribute stderrEOT.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stderrEOT @stderrEOT end |
#stderrP ⇒ Object
Returns the value of attribute stderrP.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stderrP @stderrP end |
#stdout ⇒ Object
Returns the value of attribute stdout.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stdout @stdout end |
#stdoutC ⇒ Object
Returns the value of attribute stdoutC.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stdoutC @stdoutC end |
#stdoutEOT ⇒ Object
Returns the value of attribute stdoutEOT.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stdoutEOT @stdoutEOT end |
#stdoutP ⇒ Object
Returns the value of attribute stdoutP.
25 26 27 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 25 def stdoutP @stdoutP end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
24 25 26 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 24 def tag @tag end |
Instance Method Details
#openPipes ⇒ Object
51 52 53 54 |
# File 'lib/taskjuggler/BatchProcessor.rb', line 51 def openPipes @stdoutP, @stdoutC = IO.pipe @stderrP, @stderrC = IO.pipe end |