gitlab-org--gitlab-foss/lib/gitlab/sidekiq_logging/deduplication_logger.rb

20 lines
483 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module SidekiqLogging
class DeduplicationLogger
include Singleton
include LogsJobs
def log(job, deduplication_type)
payload = parse_job(job)
payload['job_status'] = 'deduplicated'
payload['message'] = "#{base_message(payload)}: deduplicated: #{deduplication_type}"
payload['deduplication_type'] = deduplication_type
Sidekiq.logger.info payload
end
end
end
end