Skip to content

Commit

Permalink
add minor delay on ecs task launch
Browse files Browse the repository at this point in the history
  • Loading branch information
threnjen committed Nov 27, 2024
1 parent c430fe5 commit 592b42a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions aws_dagster_bgg/assets/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ def scrape_data(
task_definition if ENVIRONMENT == "prod" else f"dev_{task_definition}"
)
logger.info(task_definition)
logger.info(len(game_scraper_url_filenames))
logger.info(game_scraper_url_filenames)

for key in game_scraper_url_filenames:
filename = key.split("/")[-1].split(".")[0]
Expand All @@ -530,6 +532,7 @@ def scrape_data(
]
}
ecs_resource.launch_ecs_task(task_definition, overrides)
time.sleep(3)
logger.info(f"Launched ECS for filename: {filename}")

compare_timestamps_for_refresh(
Expand Down
2 changes: 1 addition & 1 deletion aws_terraform_bgg/task_definitions_ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module "bgg_scraper_ecs" {
task_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${var.bgg_scraper}_FargateTaskRole"
execution_role_arn = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:role/${var.bgg_scraper}_FargateExecutionRole"
image = "${data.aws_caller_identity.current.account_id}.dkr.ecr.${var.REGION}.amazonaws.com/${var.bgg_scraper}:latest"
cpu = "2048"
cpu = "1024"
memory = "8192"
region = var.REGION
}
Expand Down

0 comments on commit 592b42a

Please sign in to comment.