From d5859bb9d59b3750ac6e9b8c4c17d69c4c3ed077 Mon Sep 17 00:00:00 2001 From: "micael.bergeron" Date: Wed, 1 Nov 2017 09:07:27 -0400 Subject: [PATCH] rework the UpdateMergeRequestsWorker#metrics_tags --- app/workers/update_merge_requests_worker.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/workers/update_merge_requests_worker.rb b/app/workers/update_merge_requests_worker.rb index e364fb698d3..150788ca611 100644 --- a/app/workers/update_merge_requests_worker.rb +++ b/app/workers/update_merge_requests_worker.rb @@ -2,10 +2,8 @@ class UpdateMergeRequestsWorker include Sidekiq::Worker include DedicatedSidekiqQueue - attr_reader :metrics_tags - - def initialize - @metrics_tags = {} + def metrics_tags + @metrics_tags || {} end def perform(project_id, user_id, oldrev, newrev, ref)