BigW Consortium Gitlab

Commit 54489709 by Robert Speicher

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.
parent 92c25f42
...@@ -202,11 +202,6 @@ module ProjectsHelper ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment