Class: ExpirePipelineCacheWorker

Inherits:
Object
  • Object
show all
Includes:
ApplicationWorker, PipelineQueue
Defined in:
app/workers/expire_pipeline_cache_worker.rb

Constant Summary

Constants included from ApplicationWorker

ApplicationWorker::LOGGING_EXTRA_KEY

Constants included from WorkerAttributes

WorkerAttributes::NAMESPACE_WEIGHTS, WorkerAttributes::VALID_RESOURCE_BOUNDARIES, WorkerAttributes::VALID_URGENCIES

Instance Method Summary collapse

Methods included from Gitlab::SidekiqVersioning::Worker

#job_version

Methods included from WorkerContext

#with_context

Instance Method Details

#perform(pipeline_id) ⇒ Object

rubocop: disable CodeReuse/ActiveRecord


14
15
16
17
18
19
# File 'app/workers/expire_pipeline_cache_worker.rb', line 14

def perform(pipeline_id)
  pipeline = Ci::Pipeline.find_by(id: pipeline_id)
  return unless pipeline&.cacheable?

  Ci::ExpirePipelineCacheService.new.execute(pipeline)
end