logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: 2e71bb031b2dff90a2b0f9854bdcd804c069268a
parent: 38bc85e695e08956db6b29d482942dc759c57423
Author: Eugen Rochko <eugen@zeonfederated.com>
Date:   Sun,  8 Jan 2017 19:12:54 +0100

Fix Paperclip timeout setting. Fix bug introduced in #437

Diffstat:

Mapp/models/account.rb6++++--
Mconfig/initializers/paperclip.rb2+-
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/models/account.rb b/app/models/account.rb @@ -190,8 +190,10 @@ class Account < ApplicationRecord follow_mapping(FollowRequest.where(target_account_id: target_account_ids, account_id: account_id), :target_account_id) end - private def follow_mapping(query, field) - query.pluck(field).inject({}) { |mapping, id| mapping[id] = true } + private + + def follow_mapping(query, field) + query.pluck(field).inject({}) { |mapping, id| mapping[id] = true; mapping } end end diff --git a/config/initializers/paperclip.rb b/config/initializers/paperclip.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -Paperclip::Attachment.default_options[:read_timeout] = 60 +Paperclip.options[:read_timeout] = 60 if ENV['S3_ENABLED'] == 'true' Aws.eager_autoload!(services: %w(S3))