Raise Mastodon::RaceConditionError if Redis lock failed (#7511)
An explicit error allows user agents to know the error and Sidekiq to retry.
This commit is contained in:
parent
65d6b253fb
commit
55fd55714a
6 changed files with 12 additions and 0 deletions
|
@ -8,6 +8,8 @@ class MediaProxyController < ApplicationController
|
|||
if lock.acquired?
|
||||
@media_attachment = MediaAttachment.remote.find(params[:id])
|
||||
redownload! if @media_attachment.needs_redownload? && !reject_media?
|
||||
else
|
||||
raise Mastodon::RaceConditionError
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue