From 1b33d6cc0682da8fb68711c8577ce07422911149 Mon Sep 17 00:00:00 2001 From: Nastia Gorokhova-Alekseeva Date: Mon, 26 Sep 2022 19:27:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D1=8C=D1=8E=20=D0=B2?= =?UTF-8?q?=20=D0=BE=D0=B1=D0=BB=D0=B0=D0=BA=D0=BE=20=D1=81=D0=B1=D1=80?= =?UTF-8?q?=D0=B0=D1=81=D1=8B=D0=B2=D0=B0=D0=B5=D0=BC=20=D1=84=D0=BB=D0=B0?= =?UTF-8?q?=D0=B3=20=D1=81=D0=B8=D0=BD=D1=85=D1=80=D0=BE=D0=BD=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/paperclip/storage/no_cache_s3.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/paperclip/storage/no_cache_s3.rb b/lib/paperclip/storage/no_cache_s3.rb index 5faa821..d258cf3 100644 --- a/lib/paperclip/storage/no_cache_s3.rb +++ b/lib/paperclip/storage/no_cache_s3.rb @@ -135,6 +135,8 @@ module Paperclip def flush_writes # :nodoc: return if queued_for_write.empty? + # если есть, что записывать (queued_for_write), значит, данные устарели + instance[self.class.synced_field_name(self.class.main_store_id)] = false sync_to(self.class.main_store_id, queued_for_write) unless delay_processing? && dirty? (self.class.store_ids - [self.class.main_store_id]).each { |store_id| enqueue_sync_job(store_id) }