diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-03-05 22:02:50 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-03-06 16:53:24 +0900 |
commit | 259a85e6658d91a7eb17b752b3f54c023625e08d (patch) | |
tree | d8f1aebca95e7aaf27a9ca15c8f7ca3b9257c601 | |
parent | bbbf8e6a0234f1195a69facabab840679fb70dde (diff) | |
download | gitlab-ce-259a85e6658d91a7eb17b752b3f54c023625e08d.tar.gz |
Drop running_or_pending_build_count
-rw-r--r-- | app/models/ci/build.rb | 1 | ||||
-rw-r--r-- | app/models/project.rb | 6 |
2 files changed, 0 insertions, 7 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index b230b7f47ef..3f037822154 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -359,7 +359,6 @@ module Ci project.execute_hooks(build_data.dup, :job_hooks) project.execute_services(build_data.dup, :job_hooks) PagesService.new(build_data).execute - project.running_or_pending_build_count(force: true) end def artifacts_metadata_entry(path, **options) diff --git a/app/models/project.rb b/app/models/project.rb index a11b1e4f554..58c4094918c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1494,12 +1494,6 @@ class Project < ActiveRecord::Base update_column(:import_jid, nil) 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 def pipeline_status @pipeline_status ||= Gitlab::Cache::Ci::ProjectPipelineStatus.load_for_project(self) |