diff options
author | micael.bergeron <micaelbergeron@gmail.com> | 2017-11-01 09:07:27 -0400 |
---|---|---|
committer | micael.bergeron <micaelbergeron@gmail.com> | 2017-11-01 09:07:27 -0400 |
commit | d5859bb9d59b3750ac6e9b8c4c17d69c4c3ed077 (patch) | |
tree | 5b15da6ef39b56c741eb112cc8ac91535939933c /app/workers | |
parent | 2b7e03cf699f9d266af585a1a9399c3e219fe063 (diff) | |
download | gitlab-ce-d5859bb9d59b3750ac6e9b8c4c17d69c4c3ed077.tar.gz |
rework the UpdateMergeRequestsWorker#metrics_tags35914-merge-request-update-worker-is-slow
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/update_merge_requests_worker.rb | 6 |
1 files 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) |