Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-06-01 10:25:17 +0300
committerShinya Maeda <shinya@gitlab.com>2018-06-06 11:49:48 +0300
commit4064481501a24d31872914c845f5d8c2cfc08040 (patch)
tree6ef6ed4e7dd19f19e083c4e9b5d6615a9afe2b5e /app/models/ci
parent2522691eda46ef3ed572b747074e9b3b2e776198 (diff)
Rename find_stale_in_batches to find_builds_from_stale_live_trace. Fix comments
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/build_trace_chunk.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build_trace_chunk.rb b/app/models/ci/build_trace_chunk.rb
index 7940f7c2ee7..80a63434283 100644
--- a/app/models/ci/build_trace_chunk.rb
+++ b/app/models/ci/build_trace_chunk.rb
@@ -52,13 +52,13 @@ module Ci
end
# Find stale live traces and return their build ids
- def find_stale_in_batches(finished_before: 1.hour.ago)
+ def find_builds_from_stale_live_trace
include(EachBatch)
.select(:build_id)
.group(:build_id)
.joins(:build)
.merge(Ci::Build.finished)
- .where('ci_builds.finished_at < ?', finished_before)
+ .where('ci_builds.finished_at < ?', 1.hour.ago)
.each_batch(column: :build_id) do |chunks|
build_ids = chunks.map { |chunk| chunk.build_id }