Commit 259a85e6 authored by Shinya Maeda's avatar Shinya Maeda

Drop running_or_pending_build_count

parent bbbf8e6a
...@@ -359,7 +359,6 @@ module Ci ...@@ -359,7 +359,6 @@ module Ci
project.execute_hooks(build_data.dup, :job_hooks) project.execute_hooks(build_data.dup, :job_hooks)
project.execute_services(build_data.dup, :job_hooks) project.execute_services(build_data.dup, :job_hooks)
PagesService.new(build_data).execute PagesService.new(build_data).execute
project.running_or_pending_build_count(force: true)
end end
def artifacts_metadata_entry(path, **options) def artifacts_metadata_entry(path, **options)
......
...@@ -1494,12 +1494,6 @@ class Project < ActiveRecord::Base ...@@ -1494,12 +1494,6 @@ class Project < ActiveRecord::Base
update_column(:import_jid, nil) update_column(:import_jid, nil)
end end
def running_or_pending_build_count(force: false)
Rails.cache.fetch(['projects', id, 'running_or_pending_build_count'], force: force) do
builds.running_or_pending.count(:all)
end
end
# Lazy loading of the `pipeline_status` attribute # Lazy loading of the `pipeline_status` attribute
def pipeline_status def pipeline_status
@pipeline_status ||= Gitlab::Cache::Ci::ProjectPipelineStatus.load_for_project(self) @pipeline_status ||= Gitlab::Cache::Ci::ProjectPipelineStatus.load_for_project(self)
......
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