From 404a541dbc21b500cbf09c479ee3d2f341106863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Tue, 21 May 2019 02:31:03 +0200 Subject: [PATCH] Expire pipeline cache on finish --- app/workers/build_finished_worker.rb | 1 + spec/workers/build_finished_worker_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/workers/build_finished_worker.rb b/app/workers/build_finished_worker.rb index adc38226405..8e2a18a8fd8 100644 --- a/app/workers/build_finished_worker.rb +++ b/app/workers/build_finished_worker.rb @@ -30,6 +30,7 @@ class BuildFinishedWorker # We execute these async as these are independent operations. BuildHooksWorker.perform_async(build.id) ArchiveTraceWorker.perform_async(build.id) + ExpirePipelineCacheWorker.perform_async(build.pipeline_id) ChatNotificationWorker.perform_async(build.id) if build.pipeline.chat? end end diff --git a/spec/workers/build_finished_worker_spec.rb b/spec/workers/build_finished_worker_spec.rb index 33f327d4a0c..4adb795b1d6 100644 --- a/spec/workers/build_finished_worker_spec.rb +++ b/spec/workers/build_finished_worker_spec.rb @@ -17,6 +17,7 @@ describe BuildFinishedWorker do expect_any_instance_of(BuildCoverageWorker).to receive(:perform) expect(BuildHooksWorker).to receive(:perform_async) expect(ArchiveTraceWorker).to receive(:perform_async) + expect(ExpirePipelineCacheWorker).to receive(:perform_async) described_class.new.perform(build.id) end