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

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

class ExpireJobCacheWorker # rubocop:disable Scalability/IdempotentWorker
  include ApplicationWorker

  data_consistency :delayed

  sidekiq_options retry: 3
  include PipelineQueue

  queue_namespace :pipeline_cache
  urgency :high
  idempotent!

  def perform(job_id)
    job = CommitStatus.find_by_id(job_id)
    return unless job

    job.expire_etag_cache!
    ExpirePipelineCacheWorker.perform_async(job.pipeline_id)
  end
end