Fix Paperclip timeout setting. Fix bug introduced in #437
This commit is contained in:
parent
38bc85e695
commit
2e71bb031b
|
@ -190,8 +190,10 @@ class Account < ApplicationRecord
|
||||||
follow_mapping(FollowRequest.where(target_account_id: target_account_ids, account_id: account_id), :target_account_id)
|
follow_mapping(FollowRequest.where(target_account_id: target_account_ids, account_id: account_id), :target_account_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
private def follow_mapping(query, field)
|
private
|
||||||
query.pluck(field).inject({}) { |mapping, id| mapping[id] = true }
|
|
||||||
|
def follow_mapping(query, field)
|
||||||
|
query.pluck(field).inject({}) { |mapping, id| mapping[id] = true; mapping }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Paperclip::Attachment.default_options[:read_timeout] = 60
|
Paperclip.options[:read_timeout] = 60
|
||||||
|
|
||||||
if ENV['S3_ENABLED'] == 'true'
|
if ENV['S3_ENABLED'] == 'true'
|
||||||
Aws.eager_autoload!(services: %w(S3))
|
Aws.eager_autoload!(services: %w(S3))
|
||||||
|
|
Reference in a new issue