From 3fed2ebeefa1b40c410d516417ce69f6f622bab4 Mon Sep 17 00:00:00 2001 From: Neill Turner Date: Tue, 31 Dec 2024 10:26:33 +0000 Subject: [PATCH] debug ci --- config/initializers/dfe_analytics.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/config/initializers/dfe_analytics.rb b/config/initializers/dfe_analytics.rb index 0f4119e8aa..8f4a1f704e 100644 --- a/config/initializers/dfe_analytics.rb +++ b/config/initializers/dfe_analytics.rb @@ -1,16 +1,16 @@ DfE::Analytics.configure do |config| # Whether to log events instead of sending them to BigQuery. # - config.log_only = false + # config.log_only = true + config.log_only = (%w[development test].include?(ENV["RAILS_ENV"]) || ENV["ENVIRONMENT_NAME"].start_with?("review")) # Whether to use ActiveJob or dispatch events immediately. # - config.async = true - config.entity_table_checks_enabled = true + # config.async = true # Which ActiveJob queue to put events on # - config.queue = :analytics + # config.queue = :default # The name of the BigQuery table we’re writing to. # @@ -27,9 +27,7 @@ # Service account JSON key for the BigQuery API. See # https://cloud.google.com/bigquery/docs/authentication/service-account-file # - # We base64 encode the secret otherwise the raw JSON is mangled when it gets - #  written to/read from the Azure keyvault. - config.bigquery_api_json_key = ENV["BIGQUERY_API_JSON_KEY"] ? Base64.decode64(ENV["BIGQUERY_API_JSON_KEY"]) : nil + # config.bigquery_api_json_key = ENV['BIGQUERY_API_JSON_KEY'] # Passed directly to the retries: option on the BigQuery client # @@ -43,14 +41,14 @@ # enable analytics. You might want to hook this up to a feature flag or # environment variable. # - config.enable_analytics = proc { Rails.application.config.dfe_analytics } + config.enable_analytics = proc { Rails.env.production? } - config.user_identifier = proc { |user| user&.sub } + # Enable entity table check job + # + config.entity_table_checks_enabled = true # The environment we’re running in. This value will be attached # to all events we send to BigQuery. # # config.environment = ENV.fetch('RAILS_ENV', 'development') - - config.azure_federated_auth = ENV.include? "GOOGLE_CLOUD_CREDENTIALS" end