Class: ExpireJobCacheWorker
- Inherits:
-
Object
- Object
- ExpireJobCacheWorker
- Includes:
- ApplicationWorker, PipelineQueue
- Defined in:
- app/workers/expire_job_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
-
#perform(job_id) ⇒ Object
rubocop: disable CodeReuse/ActiveRecord.
Methods included from Gitlab::SidekiqVersioning::Worker
Methods included from WorkerContext
Instance Method Details
#perform(job_id) ⇒ Object
rubocop: disable CodeReuse/ActiveRecord
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/workers/expire_job_cache_worker.rb', line 12 def perform(job_id) job = CommitStatus.joins(:pipeline, :project).find_by(id: job_id) return unless job pipeline = job.pipeline project = job.project Gitlab::EtagCaching::Store.new.tap do |store| store.touch(project_pipeline_path(project, pipeline)) store.touch(project_job_path(project, job)) end end |