mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:12:45 +08:00
DEV: Remove FileStore#download deprecation warning (#28971)
At a point we split FileStore#download into two methods, one which returns nil (#download) and one which raises an exception (#download!) if there's a download error. When we did this we added a deprecation warning to the #download method. It has now been over a year and I have checked all relevant internal cases, so I think it's about time we remove this warning.
This commit is contained in:
parent
848af05537
commit
e68748318e
|
@ -105,12 +105,6 @@ module FileStore
|
|||
end
|
||||
|
||||
def download(object, max_file_size_kb: nil, print_deprecation: true)
|
||||
Discourse.deprecate(<<~MESSAGE) if print_deprecation
|
||||
In a future version `FileStore#download` will no longer raise an error when the
|
||||
download fails, and will instead return `nil`. If you need a method that raises
|
||||
an error, use `FileStore#download!`, which raises a `FileStore::DownloadError`.
|
||||
MESSAGE
|
||||
|
||||
DistributedMutex.synchronize("download_#{object.sha1}", validity: 3.minutes) do
|
||||
extension =
|
||||
File.extname(
|
||||
|
|
Loading…
Reference in New Issue
Block a user