Class: RunPostprocess
- Inherits:
-
OpenStudio::Workflow::Job
- Object
- OpenStudio::Workflow::Job
- RunPostprocess
- Includes:
- OpenStudio::Workflow::Util::PostProcess
- Defined in:
- lib/openstudio/workflow/jobs/run_postprocess.rb
Overview
Clean up the run directory. Currently this class does nothing else, although eventually cleanup should become driven and responsive to options
Instance Method Summary collapse
-
#initialize(input_adapter, output_adapter, registry, options = {}) ⇒ RunPostprocess
constructor
A new instance of RunPostprocess.
- #perform ⇒ Object
Methods included from OpenStudio::Workflow::Util::PostProcess
#cleanup, #gather_reports, #load_sql_file, #rename_hash_keys, #run_extract_inputs_and_outputs
Constructor Details
#initialize(input_adapter, output_adapter, registry, options = {}) ⇒ RunPostprocess
Returns a new instance of RunPostprocess.
44 45 46 47 48 49 50 |
# File 'lib/openstudio/workflow/jobs/run_postprocess.rb', line 44 def initialize(input_adapter, output_adapter, registry, = {}) defaults = { cleanup: true } = defaults.merge() super end |
Instance Method Details
#perform ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/openstudio/workflow/jobs/run_postprocess.rb', line 52 def perform @logger.debug "Calling #{__method__} in the #{self.class} class" # do not skip post_process if halted if ![:fast] @logger.info 'Gathering reports' gather_reports(@registry[:run_dir], @registry[:root_dir], @registry[:workflow_json], @logger) @logger.info 'Finished gathering reports' end if [:cleanup] @logger.info 'Beginning cleanup of the run directory' cleanup(@registry[:run_dir], @registry[:root_dir], @logger) @logger.info 'Finished cleanup of the run directory' else @logger.info 'Flag for cleanup in options set to false. Moving to next step.' end @logger.info 'Finished postprocess' nil end |