2018-11-08 19:23:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-10-15 14:42:47 +05:30
|
|
|
module Ci
|
2020-11-24 15:15:51 +05:30
|
|
|
class BuildTraceChunkFlushWorker
|
2018-10-15 14:42:47 +05:30
|
|
|
include ApplicationWorker
|
|
|
|
include PipelineBackgroundQueue
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
idempotent!
|
|
|
|
|
2018-12-05 23:21:45 +05:30
|
|
|
# rubocop: disable CodeReuse/ActiveRecord
|
2021-01-03 14:25:43 +05:30
|
|
|
def perform(id)
|
|
|
|
::Ci::BuildTraceChunk.find_by(id: id).try do |chunk|
|
2020-11-24 15:15:51 +05:30
|
|
|
chunk.persist_data!
|
2018-10-15 14:42:47 +05:30
|
|
|
end
|
|
|
|
end
|
2018-12-05 23:21:45 +05:30
|
|
|
# rubocop: enable CodeReuse/ActiveRecord
|
2018-10-15 14:42:47 +05:30
|
|
|
end
|
|
|
|
end
|