From: chr v1.x Date: Mon, 30 Dec 2019 02:17:54 +0000 (-0800) Subject: Fix backups stopping due to read timeouts (#12281) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=7e074610a6651d499267e976f45aadce8cd60d96;p=mastodon.git Fix backups stopping due to read timeouts (#12281) * Make BackupService resilient to read timeouts If an attachment read times out, assume that the resources is inaccessible and continue the backup without it. This fixes #12280. * Both errors on one line --- diff --git a/app/services/backup_service.rb b/app/services/backup_service.rb index fba2d19a0..d1090dff1 100644 --- a/app/services/backup_service.rb +++ b/app/services/backup_service.rb @@ -165,7 +165,7 @@ class BackupService < BaseService io.write(buffer) end end - rescue Errno::ENOENT + rescue Errno::ENOENT, Seahorse::Client::NetworkingError Rails.logger.warn "Could not backup file #{filename}: file not found" end end