Remove rescue clause from repository_size helper

The repository size has since become calculated (and cached) more
intelligently, and this should no longer be necessary.
This commit is contained in:
Robert Speicher 2016-05-04 17:39:06 -04:00
parent 92c25f4200
commit 5448970950

View file

@ -202,11 +202,6 @@ module ProjectsHelper
def repository_size(project = @project) def repository_size(project = @project)
size_in_bytes = project.repository_size * 1.megabyte size_in_bytes = project.repository_size * 1.megabyte
number_to_human_size(size_in_bytes, delimiter: ',', precision: 2) number_to_human_size(size_in_bytes, delimiter: ',', precision: 2)
rescue
# In order to prevent 500 error
# when application cannot allocate memory
# to calculate repo size - just show 'Unknown'
'unknown'
end end
def default_url_to_repo(project = @project) def default_url_to_repo(project = @project)