Skip to content

Commit 10b4af6

Browse files
committed
resolved PR comments
1 parent c5b04f4 commit 10b4af6

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

api/src/shared/database/database.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ def create_refresh_materialized_view_task():
191191
except Exception as e:
192192
if "ALREADY_EXISTS" in str(e):
193193
logging.info(f"Task already exists for {timestamp_str}, skipping.")
194-
return {"message": f"Task already exists for {timestamp_str}, skipping."}, 200
195-
else:
196-
raise
197194

198195
except Exception as error:
199196
error_msg = f"Error enqueuing task: {error}"

infra/functions-python/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,6 @@ resource "google_cloudfunctions2_function" "reverse_geolocation_populate" {
949949
environment_variables = {
950950
PYTHONNODEBUGRANGES = 0
951951
DB_REUSE_SESSION = "True"
952-
GOOGLE_FUNCTION_SOURCE = "reverse_geolocation_populate.py"
953952
}
954953
available_memory = local.function_reverse_geolocation_populate_config.available_memory
955954
timeout_seconds = local.function_reverse_geolocation_populate_config.timeout
@@ -1409,13 +1408,13 @@ resource "google_cloud_tasks_queue" "refresh_materialized_view_task_queue" {
14091408
name = "refresh-materialized-view-task-queue"
14101409

14111410
rate_limits {
1412-
max_concurrent_dispatches = 2
1411+
max_concurrent_dispatches = 1
14131412
max_dispatches_per_second = 0.5
14141413
}
14151414

14161415
retry_config {
14171416
# This will make the cloud task retry for ~30 minutes
1418-
max_attempts = 31
1417+
max_attempts = 5
14191418
min_backoff = "120s"
14201419
max_backoff = "120s"
14211420
max_doublings = 2

0 commit comments

Comments
 (0)