Rename with_lock
to with_redis_lock
to avoid confusion with ActiveRecord's method (#24741)
This commit is contained in:
@ -16,7 +16,7 @@ class MediaProxyController < ApplicationController
|
||||
rescue_from HTTP::TimeoutError, HTTP::ConnectionError, OpenSSL::SSL::SSLError, with: :internal_server_error
|
||||
|
||||
def show
|
||||
with_lock("media_download:#{params[:id]}") do
|
||||
with_redis_lock("media_download:#{params[:id]}") do
|
||||
@media_attachment = MediaAttachment.remote.attached.find(params[:id])
|
||||
authorize @media_attachment.status, :show?
|
||||
redownload! if @media_attachment.needs_redownload? && !reject_media?
|
||||
|
Reference in New Issue
Block a user