mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-29 19:03:41 +00:00
Increase HTTP read timeout for expensive S3 batch delete operation
This commit is contained in:
parent
a28f1d0110
commit
7ba83d0a1d
|
|
@ -112,10 +112,17 @@ class AttachmentBatch
|
|||
keys.each_slice(LIMIT) do |keys_slice|
|
||||
logger.debug { "Deleting #{keys_slice.size} objects" }
|
||||
|
||||
bucket.delete_objects(delete: {
|
||||
bucket.delete_objects(
|
||||
{
|
||||
delete: {
|
||||
objects: keys_slice.map { |key| { key: key } },
|
||||
quiet: true,
|
||||
})
|
||||
},
|
||||
},
|
||||
{
|
||||
http_read_timeout: [Paperclip::Attachment.default_options[:s3_options][:http_read_timeout], 120].max,
|
||||
}
|
||||
)
|
||||
rescue => e
|
||||
retries += 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user