rails/activestorage/lib/active_storage/service
Alexandre Ruban 9d6b68446d
ActiveStorage mirror uploads should be asynchronous
Before this commit, when a file was uploaded to a mirror service,
the file upload to each service (primary and mirrors) was happening
synchronously:

```rb
def upload(key, io, checksum: nil, **options)
  each_service.collect do |service|
    io.rewind
    service.upload key, io, checksum: checksum, **options
  end
end
```

In this commit, we change this behavior to only upload the file to the
primary service synchronously and then enqueue a job to upload the
file to the mirrors asynchronously.
2023-08-04 09:08:50 +02:00
..
azure_storage_service.rb Add missing headers to Active Storage docs [ci-skip] 2023-04-03 12:29:49 +02:00
configurator.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
disk_service.rb Add missing headers to Active Storage docs [ci-skip] 2023-04-03 12:29:49 +02:00
gcs_service.rb Add missing headers to Active Storage docs [ci-skip] 2023-04-03 12:29:49 +02:00
mirror_service.rb ActiveStorage mirror uploads should be asynchronous 2023-08-04 09:08:50 +02:00
registry.rb Standardize nodoc comments 2021-07-29 21:18:07 +00:00
s3_service.rb Add missing headers to Active Storage docs [ci-skip] 2023-04-03 12:29:49 +02:00