Commit 9711acc9 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

parent 7300440a
...@@ -105,7 +105,11 @@ class Repository ...@@ -105,7 +105,11 @@ class Repository
def commit_count def commit_count
Rails.cache.fetch(cache_key(:commit_count)) do Rails.cache.fetch(cache_key(:commit_count)) do
begin
raw_repository.raw.commit_count raw_repository.raw.commit_count
rescue
0
end
end end
end end
......
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