mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
Avoid 500 error on project page when application is close to RAM limit
This commit is contained in:
@@ -131,4 +131,13 @@ module ProjectsHelper
|
||||
"your@email.com"
|
||||
end
|
||||
end
|
||||
|
||||
def repository_size
|
||||
"#{@project.repository.size} MB"
|
||||
rescue
|
||||
# In order to prevent 500 error
|
||||
# when application cannot allocate memory
|
||||
# to calculate repo size - just show 'Unknown'
|
||||
'unknown'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
%p
|
||||
%p
|
||||
%span.light Repo size is
|
||||
#{@project.repository.size} MB
|
||||
= repository_size
|
||||
%p
|
||||
%span.light Created at
|
||||
#{@project.created_at.stamp('Aug 22, 2013')}
|
||||
|
||||
Reference in New Issue
Block a user