diff options
Diffstat (limited to 'app/workers/build_hooks_worker.rb')
-rw-r--r-- | app/workers/build_hooks_worker.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/build_hooks_worker.rb b/app/workers/build_hooks_worker.rb index 5c08344bfe3..2c62aed72d6 100644 --- a/app/workers/build_hooks_worker.rb +++ b/app/workers/build_hooks_worker.rb @@ -13,9 +13,9 @@ class BuildHooksWorker # rubocop:disable Scalability/IdempotentWorker # rubocop: disable CodeReuse/ActiveRecord def perform(build_id) - Ci::Build.includes({ runner: :tags }) - .find_by_id(build_id) - .try(:execute_hooks) + build = Ci::Build.find_by_id(build_id) + + build.execute_hooks if build end # rubocop: enable CodeReuse/ActiveRecord |