lib/ddr/jobs/fits_file_characterization.rb in ddr-models-2.3.1 vs lib/ddr/jobs/fits_file_characterization.rb in ddr-models-2.3.2

- old
+ new

@@ -8,11 +8,11 @@ EVENT_SUMMARY = 'FITS characterization of content file'.freeze def self.perform(pid) obj = ActiveFedora::Base.find(pid) tmp_filename = Ddr::Utils::sanitize_filename(obj.original_filename) || obj.content.default_file_name - Dir.mktmpdir do |dir| + Dir.mktmpdir(nil, Ddr::Models.tempdir) do |dir| infile = create_temp_infile(dir, tmp_filename, obj.content.content) fits_output, err, status = Open3.capture3(fits_command, '-i', infile) if status.success? && fits_output.present? obj.reload obj.fits.content = fits_output @@ -46,6 +46,6 @@ event_args[:outcome] = status.success? ? Ddr::Events::Event::SUCCESS : Ddr::Events::Event::FAILURE Ddr::Notifications.notify_event(:update, event_args) end end -end \ No newline at end of file +end