diff options
author | ThibG <thib@sitedethib.com> | 2018-08-21 17:53:01 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-21 17:53:01 +0200 |
commit | f06fa099625e928e5858ea81a20be1eddf6c6fbb (patch) | |
tree | 7423a3f213f64b835a9415f372984cccb4b0f355 /app/workers | |
parent | d98de8ada743886c3cd48b2ad942d46b805af7a9 (diff) |
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
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/maintenance/uncache_media_worker.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/maintenance/uncache_media_worker.rb b/app/workers/maintenance/uncache_media_worker.rb index f6a51a1b8..2d1a670a7 100644 --- a/app/workers/maintenance/uncache_media_worker.rb +++ b/app/workers/maintenance/uncache_media_worker.rb @@ -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 |