Prevent 500 on project home page if project has extremely huge number of commits

This commit is contained in:
Dmitriy Zaporozhets 2013-08-12 22:23:01 +03:00
parent 7300440a74
commit 9711acc9e1

View file

@ -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