Files
fizzy/config/initializers/active_storage.rb
T
Kevin McConnell 11a38a4526 Initial (wip) staging deployment
This adds an initial configuration for staging. Note that we are doing
this ahead of having the full infrastructure in all 3 DCs. So this
this will result in some cross-DC writes for now (e.g. we have a single cache in
IAD). We'll correct this as the infrastructure becomes available.

We'll also run jobs on every app server, until we split them out to
separate instances.
2025-11-17 09:12:41 -05:00

11 lines
331 B
Ruby

ActiveSupport.on_load(:active_storage_blob) do
ActiveStorage::DiskController.after_action only: :show do
expires_in 5.minutes, public: true
end
end
# Use DB read/write splitting for Active Storage models
ActiveSupport.on_load(:active_storage_record) do
connects_to database: { writing: :primary, reading: :replica }
end