0
0
Fork 0

Revert to using Paperclip's filesystem storage, and fix dangling records in remove_remote (#8339)

* Fix uncaching worker

* Revert to using Paperclip's filesystem backend instead of fog-local

fog-local has lots of concurrency issues, causing failure to delete files,
dangling file records, and spurious errors UncacheMediaWorker
This commit is contained in:
ThibG 2018-08-21 17:53:01 +02:00 committed by Eugen Rochko
parent d98de8ada7
commit f06fa09962
4 changed files with 5 additions and 13 deletions

View file

@ -8,7 +8,7 @@ class Maintenance::UncacheMediaWorker
def perform(media_attachment_id)
media = MediaAttachment.find(media_attachment_id)
return unless media.file.exists?
return if media.file.blank?
media.file.destroy
media.save