Skip to content

Commit

Permalink
Merge pull request #100 from NREL/fix/98-check-failed-jobs
Browse files Browse the repository at this point in the history
Fix/98 check failed jobs
  • Loading branch information
corymosiman12 authored Jan 15, 2021
2 parents f707683 + 43a81ff commit 9001d4b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/openstudio/extension/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,16 @@ def run_osw(in_osw, run_dir)
puts 'simulations are not performed, since to the @options[:run_simulations] is set to false'
end

# DLM: this does not always return false for failed CLI runs, consider checking for failed.job file as backup test
if @options[:run_simulations]
# Additional checks for failed CLI
if File.exist?(File.join(run_dir, 'failed.job'))
result = false
end

if !File.exist?(File.join(run_dir, 'finished.job'))
result = false
end
end

return result
end
Expand Down

0 comments on commit 9001d4b

Please sign in to comment.