From 058983260f4f51154ff0c6cacb450f6994a96704 Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Wed, 3 Jan 2024 14:51:05 +0000 Subject: [PATCH] Enable analytics entity table check This enables a new feature of DfE Analytics that allows us to check the latest version of an entity table in BigQuery is in sync with the database. --- config/initializers/dfe_analytics.rb | 5 ++++- config/schedule.yml | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/initializers/dfe_analytics.rb b/config/initializers/dfe_analytics.rb index 615738b046..02e6201c8b 100644 --- a/config/initializers/dfe_analytics.rb +++ b/config/initializers/dfe_analytics.rb @@ -1,6 +1,9 @@ +# frozen_string_literal: true + DfE::Analytics.configure do |config| - config.queue = :analytics + config.entity_table_checks_enabled = Rails.env.production? config.environment = HostingEnvironment.name + config.queue = :analytics config.enable_analytics = proc do diff --git a/config/schedule.yml b/config/schedule.yml index f73f49c7bf..89d9a9260f 100644 --- a/config/schedule.yml +++ b/config/schedule.yml @@ -45,6 +45,11 @@ send_reference_request_reminders: class: SendReminderEmailsJob args: ["ReferenceRequest"] +analytics_entity_table_check: + cron: "0 4 * * *" + class: DfE::Analytics::EntityTableCheckJob + queue: analytics + fetch_malware_scan_results: cron: "*/30 * * * *" class: FetchMalwareScanResultsJob