Skip to content

Commit

Permalink
Merge pull request #566 from NREL/make_tmpname_deprecate
Browse files Browse the repository at this point in the history
Make tmpname deprecate
  • Loading branch information
brianlball authored May 16, 2020
2 parents bd1d99f + c98d2cc commit c14fea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/app/lib/analysis_library/r/lhs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def plot_samples(variable, samples)
logger.info "Creating image for #{variable.name} with samples #{samples}"
save_file_name = nil
if samples && samples.count > 0
save_file_name = "#{APP_CONFIG['server_asset_path']}/R/#{Dir::Tmpname.make_tmpname(['r_samples_plot', '.png'], nil)}"
save_file_name = Dir::Tmpname.create(['r_samples_plot', '.png'], "#{APP_CONFIG['server_asset_path']}/R"){}
logger.info("R image filename is #{save_file_name}")
# If running on Docker, then use type='cairo' to create PNG (since it is headless and cairo is installed)
# png_type = Rails.env =~ /docker/ ? ', type="cairo"' : ''
Expand Down

0 comments on commit c14fea8

Please sign in to comment.