2018-11-16 19:37:17 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-17 10:06:52 -04:00
|
|
|
module Gitlab
|
|
|
|
module Metrics
|
2017-10-19 07:48:27 -04:00
|
|
|
class BackgroundTransaction < Transaction
|
2017-10-17 10:06:52 -04:00
|
|
|
def initialize(worker_class)
|
2017-10-19 05:24:15 -04:00
|
|
|
super()
|
2017-10-17 10:06:52 -04:00
|
|
|
@worker_class = worker_class
|
|
|
|
end
|
|
|
|
|
|
|
|
def labels
|
2017-10-19 05:24:15 -04:00
|
|
|
{ controller: @worker_class.name, action: 'perform' }
|
2017-10-17 10:06:52 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|