Skip to content

Commit 0c788bb

Browse files
committed
change look back to 60 days and update the test code too
1 parent 376a98f commit 0c788bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/tests/planning/test_tascomi_api_ingestion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ def test_get_days_since_last_import_two_days(self):
2121
def test_get_days_since_last_import_with_max_lookback(self):
2222
"""Test that max_lookback_days limits the number of days queried"""
2323
today = "2025-01-15"
24-
last_import_date = "20241201" # 45 days ago
24+
last_import_date = "20220720" # more than 60 days ago compared with today
2525
max_lookback_days = 7
2626

2727
with freeze_time(today):
2828
actual_response = get_days_since_last_import(
2929
last_import_date, max_lookback_days
3030
)
31-
# Should only return the last 7 days, not all 45 days
31+
# Should only return the last 7 days, not all days since last import
3232
expected_days = [
3333
"2025-01-08",
3434
"2025-01-09",

terraform/etl/24-aws-glue-tascomi-data.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module "ingest_tascomi_data" {
112112
"--private_key_secret_id" = data.aws_secretsmanager_secret.tascomi_api_private_key.id
113113
"--number_of_workers" = local.number_of_workers
114114
"--target_database_name" = aws_glue_catalog_database.raw_zone_tascomi.name
115-
"--max_lookback_days" = "30" # Limit lookback to prevent excessive API calls
115+
"--max_lookback_days" = "60" # Limit lookback to prevent excessive API calls
116116
}
117117
script_name = "tascomi_api_ingestion"
118118
spark_ui_output_storage_id = module.spark_ui_output_storage_data_source.bucket_id

0 commit comments

Comments
 (0)