lib/openstudio/analysis/server_api.rb in openstudio-analysis-0.4.3 vs lib/openstudio/analysis/server_api.rb in openstudio-analysis-0.4.4

- old
+ new

@@ -12,11 +12,11 @@ @hostname = options[:hostname] fail 'no host defined for server api class' if @hostname.nil? - # todo: add support for the proxy + # TODO: add support for the proxy # create connection with basic capabilities @conn = Faraday.new(url: @hostname) do |faraday| faraday.request :url_encoded # form-encode POST params faraday.use Faraday::Response::Logger, @logger @@ -573,12 +573,10 @@ req.body = analysis_action.to_json end if response.status == 200 puts "Killed analysis #{analysis_id}" - else - # raise "Could not kill the analysis with response of #{response.inspect}" end end def kill_all_analyses project_ids = get_project_ids @@ -701,11 +699,11 @@ analysis_id end # creates a new analysis and runs rgenoud optimization - number of generations isn't used right now - def run_rgenoud(formulation_filename, analysis_zip_filename, _number_of_generations) + def run_rgenoud(formulation_filename, analysis_zip_filename) project_options = {} project_id = new_project(project_options) analysis_options = { formulation_file: formulation_filename, @@ -788,12 +786,12 @@ simulate_data_point_filename: 'simulate_data_point.rb', run_data_point_filename: run_data_point_filename } start_analysis(analysis_id, run_options) - # If the analysis is LHS, then go ahead and run batch run because there is + # If the analysis is a staged analysis, then go ahead and run batch run because there is # no explicit way to tell the system to do it - if analysis_type == 'lhs' || analysis_type == 'preflight' || analysis_type == 'single_run' || analysis_type == 'doe' + if %w(lhs preflight single_run repeat_run doe).include? analysis_type run_options = { analysis_action: 'start', without_delay: false, analysis_type: 'batch_run', allow_multiple_jobs: allow_multiple_jobs,