diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-04 21:34:11 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-06-04 21:34:11 +0200 |
commit | f12ee2a2f490e6d126ac6345a5ad7cbf12833791 (patch) | |
tree | c1669f129d10a1b903214a836cf02265f3d0b28d /app/models | |
parent | 3571b97effd81f9a84f238f918544c6e5c625b76 (diff) | |
download | gitlab-ce-f12ee2a2f490e6d126ac6345a5ad7cbf12833791.tar.gz |
Remove unused running_or_pending_build_countremove-unused-query-in-hooks
Diffstat (limited to 'app/models')
-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 75fd55a8f7b..7cf4dda178a 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -403,7 +403,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 browsable_artifacts? diff --git a/app/models/project.rb b/app/models/project.rb index 32298fc7f5c..a094dbcb747 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1649,12 +1649,6 @@ class Project < ActiveRecord::Base import_state.update_column(: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) |