diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-06-02 09:49:38 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-06-02 09:49:38 +0200 |
commit | 25a46d9e5999682f2a9bba3492f5497d1e0ce0bc (patch) | |
tree | 776495c28dcc1e75ceacdfcbe801ab7344978b88 /lib | |
parent | c1d0a6a7981b5fe74bdd03c958a558096ea3cde8 (diff) | |
parent | 1485bd9b4bf407d1051a6b160d2530c9ca93f10b (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/javascript/styles/fonts/montserrat.scss`: Code style changes upstream, path changes in glitch-soc. Applied upstream's code style changes. - `app/javascript/styles/fonts/roboto-mono.scss`: Code style changes upstream, path changes in glitch-soc. Applied upstream's code style changes. - `app/javascript/styles/fonts/roboto.scss`: Code style changes upstream, path changes in glitch-soc. Applied upstream's code style changes. - `app/models/account.rb`: Textual conflict only caused by glitch-soc using a different value for character limits in a nearby line. Applied upstream's changes. - `app/views/statuses/_simple_status.html.haml`: Attribute added to a tag modified by glitch-soc. Added upstream's attributes. - `yarn.lock`: Upstream added/updated dependencies close to glitch-soc-only ones. Updated/added upstream dependencies.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/paperclip/attachment_extensions.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/paperclip/attachment_extensions.rb b/lib/paperclip/attachment_extensions.rb index 786f558e9..d66a17623 100644 --- a/lib/paperclip/attachment_extensions.rb +++ b/lib/paperclip/attachment_extensions.rb @@ -81,6 +81,9 @@ module Paperclip # to respond or don't respond at all and as such minimize the # impact of object storage outages on application throughput def save + # Don't go through Stoplight if we don't have anything object-storage-oriented to do + return super if @queued_for_delete.empty? && @queued_for_write.empty? && !dirty? + Stoplight('object-storage') { super }.with_threshold(STOPLIGHT_THRESHOLD).with_cool_off_time(STOPLIGHT_COOLDOWN).with_error_handler do |error, handle| if error.is_a?(Seahorse::Client::NetworkingError) handle.call(error) |