diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-06-01 10:25:17 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-06-06 11:49:48 +0300 |
commit | 4064481501a24d31872914c845f5d8c2cfc08040 (patch) | |
tree | 6ef6ed4e7dd19f19e083c4e9b5d6615a9afe2b5e /app/workers/ci | |
parent | 2522691eda46ef3ed572b747074e9b3b2e776198 (diff) |
Rename find_stale_in_batches to find_builds_from_stale_live_trace. Fix comments
Diffstat (limited to 'app/workers/ci')
-rw-r--r-- | app/workers/ci/rescue_stale_live_trace_worker.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/workers/ci/rescue_stale_live_trace_worker.rb b/app/workers/ci/rescue_stale_live_trace_worker.rb index be0194b63ae..c4a462446d4 100644 --- a/app/workers/ci/rescue_stale_live_trace_worker.rb +++ b/app/workers/ci/rescue_stale_live_trace_worker.rb @@ -4,12 +4,10 @@ module Ci include CronjobQueue def perform - # Reschedule to archive live traces - # - # The targets are jobs with the following conditions - # - Jobs had been finished 1 hour ago, but they don't have an archived trace yet - # This could happen when their sidekiq-jobs are lost by SIGKILL - Ci::BuildTraceChunk.find_stale_in_batches(finished_before: 1.hour.ago) do |build_ids| + # Archive live traces which still resides in redis or database + # This could happen when sidekiq-jobs for archivements are lost by SIGKILL + # Issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/36791 + Ci::BuildTraceChunk.find_builds_from_stale_live_trace do |build_ids| Ci::Build.where(id: build_ids).find_each do |build| begin build.trace.archive! |