Prevent 500 on project home page if project has extremely huge number of commits
This commit is contained in:
parent
7300440a74
commit
9711acc9e1
1 changed files with 5 additions and 1 deletions
|
@ -105,7 +105,11 @@ class Repository
|
|||
|
||||
def commit_count
|
||||
Rails.cache.fetch(cache_key(:commit_count)) do
|
||||
raw_repository.raw.commit_count
|
||||
begin
|
||||
raw_repository.raw.commit_count
|
||||
rescue
|
||||
0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue