Class: OpenC3::ProcessManagerProcess
- Inherits:
-
OperatorProcess
- Object
- OperatorProcess
- OpenC3::ProcessManagerProcess
- Defined in:
- lib/openc3/utilities/process_manager.rb
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#process_type ⇒ Object
Returns the value of attribute process_type.
-
#status ⇒ Object
Returns the value of attribute status.
Attributes inherited from OperatorProcess
#env, #new_temp_dir, #process_definition, #scope, #temp_dir, #work_dir
Instance Method Summary collapse
-
#initialize(cmd_array, process_type, detail, expires_at, **kw_args) ⇒ ProcessManagerProcess
constructor
A new instance of ProcessManagerProcess.
- #start ⇒ Object
Methods inherited from OperatorProcess
#alive?, #cmd_line, #exit_code, #extract_output, #hard_stop, #output_increment, setup, #soft_stop, #stderr, #stdout
Constructor Details
#initialize(cmd_array, process_type, detail, expires_at, **kw_args) ⇒ ProcessManagerProcess
Returns a new instance of ProcessManagerProcess.
37 38 39 40 41 42 43 |
# File 'lib/openc3/utilities/process_manager.rb', line 37 def initialize(cmd_array, process_type, detail, expires_at, **kw_args) super(cmd_array, **kw_args) @process_type = process_type @detail = detail @expires_at = expires_at @status = nil end |
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail.
32 33 34 |
# File 'lib/openc3/utilities/process_manager.rb', line 32 def detail @detail end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
33 34 35 |
# File 'lib/openc3/utilities/process_manager.rb', line 33 def expires_at @expires_at end |
#name ⇒ Object
Returns the value of attribute name.
35 36 37 |
# File 'lib/openc3/utilities/process_manager.rb', line 35 def name @name end |
#process_type ⇒ Object
Returns the value of attribute process_type.
31 32 33 |
# File 'lib/openc3/utilities/process_manager.rb', line 31 def process_type @process_type end |
#status ⇒ Object
Returns the value of attribute status.
34 35 36 |
# File 'lib/openc3/utilities/process_manager.rb', line 34 def status @status end |
Instance Method Details
#start ⇒ Object
45 46 47 48 49 50 51 |
# File 'lib/openc3/utilities/process_manager.rb', line 45 def start super() if @process @status = ProcessStatusModel.new(name: @name, process_type: @process_type, detail: @detail, state: "Running", scope: @scope) @status.create end end |