Skip to content

Commit

Permalink
Merge pull request #4008 from nulib/4249-preservation-check-schedule
Browse files Browse the repository at this point in the history
Read preservation check schedule from secrets manager
  • Loading branch information
mbklein authored Jun 11, 2024
2 parents 4d1b7ae + 1f74158 commit 44fdd2d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/config/releases.exs
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ config :meadow, Meadow.Scheduler,
overlap: false,
timezone: "America/Chicago",
jobs: [
# Runs daily at 2AM Central Time
{"0 2 * * *", {Meadow.Data.PreservationChecks, :start_job, []}}
# Runs daily at the configured time (default: 2AM Central)
{
aws_secret("meadow", dig: ["scheduler", "preservation_check"], default: "0 2 * * *"),
{Meadow.Data.PreservationChecks, :start_job, []}
}
]

config :ueberauth, Ueberauth,
Expand Down
4 changes: 4 additions & 0 deletions infrastructure/deploy/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ locals {
tiff = module.pipeline_lambda["tiff"].lambda_function_arn
}

scheduler = {
preservation_check = var.preservation_check_schedule
}

streaming = {
base_url = "https://${aws_route53_record.meadow_streaming_cloudfront.fqdn}/"
distribution_id = aws_cloudfront_distribution.meadow_streaming.id
Expand Down
5 changes: 5 additions & 0 deletions infrastructure/deploy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ variable "streaming_config" {
}
}

variable "preservation_check_schedule" {
type = string
default = "0 2 * * *"
}

variable "trusted_referers" {
type = string
default = ""
Expand Down

0 comments on commit 44fdd2d

Please sign in to comment.