diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 18:09:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 18:09:00 +0000 |
commit | e4dffdfe364af6c72dcb6b4671cb39a24e8e100c (patch) | |
tree | 6428a1c3472b14396645dcb280b219dbc0420c66 /app/workers | |
parent | 0ab47b994caa80c5587f33dc818626b66cfdafe2 (diff) | |
download | gitlab-ce-e4dffdfe364af6c72dcb6b4671cb39a24e8e100c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/build_finished_worker.rb | 2 | ||||
-rw-r--r-- | app/workers/expire_pipeline_cache_worker.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/build_finished_worker.rb b/app/workers/build_finished_worker.rb index e61f37ddce1..77ce0923307 100644 --- a/app/workers/build_finished_worker.rb +++ b/app/workers/build_finished_worker.rb @@ -32,7 +32,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) + ExpirePipelineCacheWorker.perform_async(build.pipeline_id) if build.pipeline.cacheable? ChatNotificationWorker.perform_async(build.id) if build.pipeline.chat? end end diff --git a/app/workers/expire_pipeline_cache_worker.rb b/app/workers/expire_pipeline_cache_worker.rb index ab57c59ffda..1d204e0a19e 100644 --- a/app/workers/expire_pipeline_cache_worker.rb +++ b/app/workers/expire_pipeline_cache_worker.rb @@ -11,7 +11,7 @@ class ExpirePipelineCacheWorker # rubocop: disable CodeReuse/ActiveRecord def perform(pipeline_id) pipeline = Ci::Pipeline.find_by(id: pipeline_id) - return unless pipeline + return unless pipeline&.cacheable? Ci::ExpirePipelineCacheService.new.execute(pipeline) end |