Skip to content

Commit

Permalink
Fix backups stopping due to read timeouts (mastodon#12281)
Browse files Browse the repository at this point in the history
* 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 mastodon#12280.

* Both errors on one line
  • Loading branch information
chr-1x authored and multiple creatures committed Apr 4, 2020
1 parent 26e82eb commit d3e6819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/backup_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def download_to_tar(tar, attachment, filename)
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

0 comments on commit d3e6819

Please sign in to comment.