gitlab-org--gitlab-foss/app/workers/expire_job_cache_worker.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
465 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class ExpireJobCacheWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker
data_consistency :delayed
sidekiq_options retry: 3
include PipelineQueue
2017-11-28 11:16:50 -05:00
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