File tree Expand file tree Collapse file tree 7 files changed +32
-11
lines changed
Expand file tree Collapse file tree 7 files changed +32
-11
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ inputs = {
6464 dependency.alb.outputs.load_balancer_app_security_group
6565 ]
6666
67+ # Enable Execute Command
68+ enable_execute_command = get_env (" ECS_TASK_ENABLE_EXECUTE_COMMAND" , " false" ) == " true" ? true : false
69+
6770 # Merge secrets with: key:ValueFrom together
6871 container_secrets = concat (dependency. extras . outputs . container_secrets ,
6972 dependency. rds . outputs . database_config_as_ecs_secrets_inputs )
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ inputs = {
6969 dependency.alb.outputs.load_balancer_app_security_group
7070 ]
7171
72+ # Enable Execute Command
73+ enable_execute_command = get_env (" ECS_TASK_ENABLE_EXECUTE_COMMAND" , " false" ) == " true" ? true : false
74+
7275 # Merge secrets with: key:ValueFrom together
7376 container_secrets = concat (dependency. extras . outputs . container_secrets ,
7477 dependency. rds . outputs . database_config_as_ecs_secrets_inputs )
@@ -82,8 +85,8 @@ inputs = {
8285 # # Task count for ECS services.
8386 tasks_count = {
8487 desired_count = 1
85- min_healthy_pct = 25
86- max_pct = 200
88+ min_healthy_pct = 100
89+ max_pct = 300
8790 }
8891
8992 health_check_grace_period_seconds = 60
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ inputs = {
6565 ]
6666
6767 # Enable Execute Command
68- enable_execute_command = false
68+ enable_execute_command = get_env ( " ECS_TASK_ENABLE_EXECUTE_COMMAND " , " false " ) == " true " ? true : false
6969
7070 # Merge secrets with: key:ValueFrom together
7171 container_secrets = concat (dependency. extras . outputs . container_secrets ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ inputs = {
7070 ]
7171
7272 # Enable Execute Command
73- enable_execute_command = false
73+ enable_execute_command = get_env ( " ECS_TASK_ENABLE_EXECUTE_COMMAND " , " false " ) == " true " ? true : false
7474
7575 # Merge secrets with: key:ValueFrom together
7676 container_secrets = concat (dependency. extras . outputs . container_secrets ,
@@ -85,8 +85,8 @@ inputs = {
8585 # # Task count for ECS services.
8686 tasks_count = {
8787 desired_count = 1
88- min_healthy_pct = 25
89- max_pct = 200
88+ min_healthy_pct = 100
89+ max_pct = 600
9090 }
9191
9292 # # Scaling Policy Target Values
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ inputs = {
6565 ]
6666
6767 # Enable Execute Command
68- enable_execute_command = false
68+ enable_execute_command = get_env ( " ECS_TASK_ENABLE_EXECUTE_COMMAND " , " false " ) == " true " ? true : false
6969
7070 # Merge secrets with: key:ValueFrom together
7171 container_secrets = concat (dependency. extras . outputs . container_secrets ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ inputs = {
7070 ]
7171
7272 # Enable Execute Command
73- enable_execute_command = false
73+ enable_execute_command = get_env ( " ECS_TASK_ENABLE_EXECUTE_COMMAND " , " false " ) == " true " ? true : false
7474
7575 # Merge secrets with: key:ValueFrom together
7676 container_secrets = concat (dependency. extras . outputs . container_secrets ,
@@ -85,8 +85,8 @@ inputs = {
8585 # # Task count for ECS services.
8686 tasks_count = {
8787 desired_count = 1
88- min_healthy_pct = 25
89- max_pct = 200
88+ min_healthy_pct = 100
89+ max_pct = 400
9090 }
9191
9292 # # Scaling Policy Target Values
Original file line number Diff line number Diff line change 77from typing import List
88
99from databases import Database
10- from backend .services .users .user_service import UserService
10+ from backend .services .users .user_service import UserService , UserServiceError
1111from backend .models .postgis .user import User
1212from backend .config import settings
1313
@@ -77,6 +77,21 @@ async def process_user(
7777 )
7878 await asyncio .sleep (RETRY_DELAY )
7979 continue
80+ except UserServiceError as exc :
81+ # Non-retriable external API error from UserService (e.g. OSM returned 404/410)
82+ # 404 for user not found.
83+ # 410 for user deleted from osm. Gone error code.
84+ async with failed_lock :
85+ failed_users .append (user_record .id )
86+ logger .info (
87+ "OSM error for user %s — recorded in osm_failed_users: %s" ,
88+ user_record .id ,
89+ exc ,
90+ )
91+ logger .debug (
92+ "UserServiceError for user %s" , user_record .id , exc_info = True
93+ )
94+ break
8095 except Exception :
8196 async with failed_lock :
8297 failed_users .append (user_record .id )
You can’t perform that action at this time.
0 commit comments