Skip to content

Commit

Permalink
Merge pull request #427 from NREL/oscli-output
Browse files Browse the repository at this point in the history
Oscli output
  • Loading branch information
nllong authored Nov 5, 2018
2 parents 4a83fa2 + 64f138d commit 5c6d853
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/app/jobs/dj_jobs/run_simulate_data_point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ def perform
rescue Exception => e
@sim_logger.error "Workflow #{osw_path} failed with error #{e}"
run_result = :errored
ensure
if process_log
@sim_logger.info "Oscli output: #{File.read(process_log)}"
end
end

end
Expand Down
4 changes: 4 additions & 0 deletions server/spec/features/dj_run_simulation_data_point_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@
a = RestClient.get "http://#{host}/data_points/#{datapoint_id}.html"
puts "accessed http://#{host}/data_points/#{datapoint_id}.html"

# pulling data point simulation log
l = RestClient.get "http://#{host}/data_points/#{datapoint_id}/download_result_file?filename=#{datapoint_id}.log"
expect(l.include? 'Oscli output:').to eq(true)

# Verify that the results exist
j = api.get_analysis_results(analysis_id)
expect(j).to be_a Hash
Expand Down

0 comments on commit 5c6d853

Please sign in to comment.