Skip to content

Commit

Permalink
debug ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Neill Turner committed Dec 31, 2024
1 parent 266cbc2 commit 3fed2eb
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions config/initializers/dfe_analytics.rb
Original file line number Diff line number Diff line change
@@ -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.
#
Expand All @@ -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
#
Expand All @@ -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

0 comments on commit 3fed2eb

Please sign in to comment.