lib/paperweight/post_process_job.rb in paperweight-0.2.0 vs lib/paperweight/post_process_job.rb in paperweight-1.0.0
- old
+ new
@@ -6,12 +6,10 @@
queue_as :default
discard_on ActiveJob::DeserializationError
def perform(model, name, url)
- model.update!(
- name => Download.new.download(url),
- :"#{name}_processing" => false
- )
+ tempfile = Download.new.download(url)
+ model.update!(name => tempfile, :"#{name}_processing" => nil)
end
end
end