Merge pull request #3013 from iv-org/rescue-db-errors-get-video

Rescue DB errors in get_video()
This commit is contained in:
Samantaz Fox 2022-04-09 19:35:49 +02:00 committed by GitHub
commit 5637c6e651
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1094,6 +1094,10 @@ def get_video(id, refresh = true, region = nil, force_refresh = false)
end
return video
rescue DB::Error
# Avoid common `DB::PoolRetryAttemptsExceeded` error and friends
# Note: All DB errors inherit from `DB::Error`
return fetch_video(id, region)
end
def fetch_video(id, region)