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: 79881ec84fdaa1fbd8a4872f3a9a266399e62ac4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# frozen_string_literal: true

module Ci
  class BuildTraceChunkFlushWorker
    include ApplicationWorker

    data_consistency :always

    sidekiq_options retry: 3
    include PipelineBackgroundQueue

    deduplicate :until_executed

    idempotent!

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