Expire pipeline cache on finish

This commit is contained in:
Matija Čupić 2019-05-21 02:31:03 +02:00
parent 01a28eada1
commit 404a541dbc
No known key found for this signature in database
GPG key ID: 4BAF84FFACD2E5DE
2 changed files with 2 additions and 0 deletions

View file

@ -30,6 +30,7 @@ class BuildFinishedWorker
# We execute these async as these are independent operations. # We execute these async as these are independent operations.
BuildHooksWorker.perform_async(build.id) BuildHooksWorker.perform_async(build.id)
ArchiveTraceWorker.perform_async(build.id) ArchiveTraceWorker.perform_async(build.id)
ExpirePipelineCacheWorker.perform_async(build.pipeline_id)
ChatNotificationWorker.perform_async(build.id) if build.pipeline.chat? ChatNotificationWorker.perform_async(build.id) if build.pipeline.chat?
end end
end end

View file

@ -17,6 +17,7 @@ describe BuildFinishedWorker do
expect_any_instance_of(BuildCoverageWorker).to receive(:perform) expect_any_instance_of(BuildCoverageWorker).to receive(:perform)
expect(BuildHooksWorker).to receive(:perform_async) expect(BuildHooksWorker).to receive(:perform_async)
expect(ArchiveTraceWorker).to receive(:perform_async) expect(ArchiveTraceWorker).to receive(:perform_async)
expect(ExpirePipelineCacheWorker).to receive(:perform_async)
described_class.new.perform(build.id) described_class.new.perform(build.id)
end end