Welcome to mirror list, hosted at ThFree Co, Russian Federation.

background_transaction.rb « metrics « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7b05ae29b02764d4bfcb8065e032b1b0741e9eba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Gitlab
  module Metrics
    class BackgroundTransaction < Transaction
      def initialize(worker_class)
        super()
        @worker_class = worker_class
      end

      def labels
        { controller: @worker_class.name, action: 'perform', feature_category: @worker_class.try(:get_feature_category).to_s }
      end
    end
  end
end