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:
Ted Johansson 2024-09-19 11:08:26 +08:00 committed by GitHub
parent 848af05537
commit e68748318e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 6 deletions

View File

@ -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(