summaryrefslogtreecommitdiff
path: root/app/workers/expire_job_cache_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/expire_job_cache_worker.rb')
-rw-r--r--app/workers/expire_job_cache_worker.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/app/workers/expire_job_cache_worker.rb b/app/workers/expire_job_cache_worker.rb
index ce27fed7fb1..77b0edfd7de 100644
--- a/app/workers/expire_job_cache_worker.rb
+++ b/app/workers/expire_job_cache_worker.rb
@@ -16,19 +16,13 @@ class ExpireJobCacheWorker
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
+ Gitlab::EtagCaching::Store.new.touch(project_job_path(project, job))
+ ExpirePipelineCacheWorker.perform_async(pipeline.id)
end
# rubocop: enable CodeReuse/ActiveRecord
private
- def project_pipeline_path(project, pipeline)
- Gitlab::Routing.url_helpers.project_pipeline_path(project, pipeline, format: :json)
- end
-
def project_job_path(project, job)
Gitlab::Routing.url_helpers.project_build_path(project, job.id, format: :json)
end