diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /app/workers/pipeline_hooks_worker.rb | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'app/workers/pipeline_hooks_worker.rb')
-rw-r--r-- | app/workers/pipeline_hooks_worker.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/workers/pipeline_hooks_worker.rb b/app/workers/pipeline_hooks_worker.rb index 322f92d376b..c67f3860a50 100644 --- a/app/workers/pipeline_hooks_worker.rb +++ b/app/workers/pipeline_hooks_worker.rb @@ -12,9 +12,10 @@ class PipelineHooksWorker # rubocop:disable Scalability/IdempotentWorker # rubocop: disable CodeReuse/ActiveRecord def perform(pipeline_id) - Ci::Pipeline - .find_by(id: pipeline_id) - .try(:execute_hooks) + pipeline = Ci::Pipeline.find_by(id: pipeline_id) + return unless pipeline + + Ci::Pipelines::HookService.new(pipeline).execute end # rubocop: enable CodeReuse/ActiveRecord end |