Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions infra/api/app-config/env-config/scheduled_jobs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ locals {
training = ["poetry", "run", "flask", "task", "sam-extracts"]
prod = ["poetry", "run", "flask", "task", "sam-extracts"]
}
build-automatic-opportunities-state = {
dev = "ENABLED"
staging = "ENABLED"
training = "ENABLED"
prod = "DISABLED"
}
scheduled_jobs = {
load-transform = {
task_command = local.load-transform-args[var.environment]
Expand Down Expand Up @@ -154,5 +160,16 @@ locals {
mem = try(local.scheduled_jobs_config[var.environment].mem, null)
environment_vars = try(local.scheduled_jobs_config[var.environment].environment_vars, null)
}
build-automatic-opportunities = {
task_command = ["poetry", "run", "flask", "task", "build-automatic-opportunities"]
# Every day at 7:15am Eastern Time during DST. 8:15am during non-DST.
# Runs just before the search load job that runs 30 minutes after the hour.
schedule_expression = "cron(15 12 * * ? *)"
# Only enable in dev/staging/training, do not run in prod
state = local.build-automatic-opportunities-state[var.environment]
cpu = try(local.scheduled_jobs_config[var.environment].cpu, null)
mem = try(local.scheduled_jobs_config[var.environment].mem, null)
environment_vars = try(local.scheduled_jobs_config[var.environment].environment_vars, null)
}
}
}