diff options
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r-- | app/models/ci/pipeline.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 5d079f57267..992df095813 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -393,6 +393,10 @@ module Ci newest_first(ref: ref).failed.take end + def self.jobs_count_in_alive_pipelines + created_after(24.hours.ago).alive.joins(:builds).count + end + # Returns a Hash containing the latest pipeline for every given # commit. # |