diff options
Diffstat (limited to 'app/services/service_ping/build_payload_service.rb')
-rw-r--r-- | app/services/service_ping/build_payload_service.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/app/services/service_ping/build_payload_service.rb b/app/services/service_ping/build_payload_service.rb deleted file mode 100644 index f4ae939fd07..00000000000 --- a/app/services/service_ping/build_payload_service.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module ServicePing - class BuildPayloadService - def execute - return {} unless allowed_to_report? - - raw_payload - end - - private - - def allowed_to_report? - product_intelligence_enabled? && !User.single_user&.requires_usage_stats_consent? - end - - def product_intelligence_enabled? - ::Gitlab::CurrentSettings.usage_ping_enabled? - end - - def raw_payload - @raw_payload ||= ::Gitlab::Usage::ServicePingReport.for(output: :all_metrics_values) - end - end -end - -ServicePing::BuildPayloadService.prepend_mod_with('ServicePing::BuildPayloadService') |