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

build_trace_chunk_flush_worker.rb « ci « workers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2908c7c2d0ba72cb6621bb6f23d47c34be5e4684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module Ci
  class BuildTraceChunkFlushWorker
    include ApplicationWorker
    include PipelineBackgroundQueue

    idempotent!

    # rubocop: disable CodeReuse/ActiveRecord
    def perform(chunk_id)
      ::Ci::BuildTraceChunk.find_by(id: chunk_id).try do |chunk|
        chunk.persist_data!
      end
    end
    # rubocop: enable CodeReuse/ActiveRecord
  end
end