]> cat aescling's git repositories - mastodon.git/commitdiff
Fix backups stopping due to read timeouts (#12281)
authorchr v1.x <chr@cybre.space>
Mon, 30 Dec 2019 02:17:54 +0000 (18:17 -0800)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 30 Dec 2019 02:17:54 +0000 (03:17 +0100)
* 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

app/services/backup_service.rb

index fba2d19a08ba23a47214aa2b15c0491e24bf94ab..d1090dff1b8577154fc9cc2371b5c657ca151a3f 100644 (file)
@@ -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