From fc0776cc4ee205d25b56884e679d67e8918638ed Mon Sep 17 00:00:00 2001 From: Andrew Newdigate Date: Mon, 22 Oct 2018 17:56:29 +0100 Subject: Syntax changes as suggested by @jacobvosmaer-gitlab --- lib/gitlab/cluster/lifecycle_events.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gitlab/cluster/lifecycle_events.rb b/lib/gitlab/cluster/lifecycle_events.rb index b9fe5b00474..97aeed2fa9f 100644 --- a/lib/gitlab/cluster/lifecycle_events.rb +++ b/lib/gitlab/cluster/lifecycle_events.rb @@ -36,7 +36,7 @@ module Gitlab # Signal worker_start event # This should be called from unicorn/puma/etc lifecycle hooks def self.signal_worker_start - @worker_start_listeners && @worker_start_listeners.each do |block| + @worker_start_listeners&.each do |block| block.call end end @@ -44,7 +44,7 @@ module Gitlab # Signal before_fork event # This should be called from unicorn/puma/etc lifecycle hooks def self.signal_before_fork - @before_fork_listeners && @before_fork_listeners.each do |block| + @before_fork_listeners&.each do |block| block.call end end -- cgit v1.2.1