From 17321cff3265226f39d33e79971d069199ffd4e6 Mon Sep 17 00:00:00 2001 From: Michael Chouinard <46358556+chouinar@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:39:12 -0400 Subject: [PATCH] [Issue #2528] Change job schedule ELT process to hourly (#2641) ## Summary Fixes #2528 ### Time to review: __3 mins__ ## Changes proposed Modified ELT process to run hourly Removed the load job for the v0 data ## Context for reviewers I can't imagine there is much value in the v0 job now that v1 works. Probably will save us a bit as we won't be running a process near constantly that no one uses. I changed the schedule expression to a cron so that the schedule is a bit more consistent. The `rate(..)` configuration seems to be based on when you turn it on, or last did a deploy. This will keep it from varying every time we deploy and instead make it so it's always at the top of the hour. ## Additional information https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-scheduled-rule-pattern.html --- infra/api/app-config/env-config/scheduled_jobs.tf | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/infra/api/app-config/env-config/scheduled_jobs.tf b/infra/api/app-config/env-config/scheduled_jobs.tf index 9950d79ae..2b92911ce 100644 --- a/infra/api/app-config/env-config/scheduled_jobs.tf +++ b/infra/api/app-config/env-config/scheduled_jobs.tf @@ -40,14 +40,10 @@ locals { ], } scheduled_jobs = { - copy-oracle-data = { - task_command = ["poetry", "run", "flask", "data-migration", "copy-oracle-data"] - schedule_expression = "rate(2 minutes)" - state = "ENABLED" - } load-transform = { - task_command = local.load-transform-args[var.environment] - schedule_expression = "rate(1 days)" + task_command = local.load-transform-args[var.environment] + # Every hour at the top of the hour + schedule_expression = "cron(0 * * * ? *)" state = "ENABLED" } }