Skip to content

Commit

Permalink
Updater: log file on network error
Browse files Browse the repository at this point in the history
  • Loading branch information
glebm committed Apr 25, 2021
1 parent 8b5b579 commit fdef7a0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks/updater/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ def read_files(path, files)
log_http_get_files files, path_url, false
files.map do |name|
Thread.start {
contents[name] = URI.open("#{path_url}/#{name}").read
begin
url = "#{path_url}/#{name}"
contents[name] = URI.open(url).read
rescue Exception => e
log "Error downloading #{url}: #{e}"
exit 1
end
WRITE_FILES_MUTEX.synchronize { write_cached_files path, name => contents[name] }
}
end.each(&:join)
Expand Down

0 comments on commit fdef7a0

Please sign in to comment.