Commit 9be2a4a1 authored by Robert Speicher's avatar Robert Speicher
Browse files

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 208dd8c1748e
...@@ -202,11 +202,6 @@ ...@@ -202,11 +202,6 @@
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)
......
Supports Markdown
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