Skip to content

Commit a10b1c4

Browse files
committed
removing unecessary dead letter
1 parent 4698115 commit a10b1c4

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

infra/functions-python/main.tf

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ terraform {
2424

2525
locals {
2626
x_number_of_concurrent_instance = 4
27-
27+
deployment_timestamp = formatdate("YYYYMMDDhhmmss", timestamp())
2828
function_tokens_config = jsondecode(file("${path.module}../../../functions-python/tokens/function_config.json"))
2929
function_tokens_zip = "${path.module}/../../functions-python/tokens/.dist/tokens.zip"
3030

@@ -348,34 +348,14 @@ resource "google_cloudfunctions2_function" "extract_location_batch" {
348348
}
349349

350350
# 3. functions/validation_report_processor cloud function
351-
352-
# Create a dead letter queue for the cloud tasks
353-
resource "google_cloud_tasks_queue" "cloud_tasks_dead_letter_queue" {
354-
name = "cloud-tasks-dead-letter-queue-${var.environment}"
355-
location = var.gcp_region
356-
357-
# Optionally set rate limits for the DLQ
358-
rate_limits {
359-
max_dispatches_per_second = 5
360-
max_concurrent_dispatches = 2
361-
}
362-
363-
# Optional retry configuration for DLQ
364-
retry_config {
365-
max_attempts = 0 # Prevent retries in the DLQ
366-
min_backoff = "1s"
367-
max_backoff = "10s"
368-
}
369-
}
370-
371351
# Create a queue for the cloud tasks
372352
# The 2X rate is defined as 4*2 concurrent dispatches and 1 dispatch per second
373353
# The name of the queue need to be dynamic due to GCP limitations
374354
# references:
375355
# - https://cloud.google.com/tasks/docs/deleting-appengine-queues-and-tasks#deleting_queues
376356
# - https://issuetracker.google.com/issues/263947953
377357
resource "google_cloud_tasks_queue" "cloud_tasks_2x_rate_queue" {
378-
name = "cloud-tasks-2x-rate-queue-${var.environment}-${formatdate("YYYYMMDDhhmmss", timestamp())}"
358+
name = "cloud-tasks-2x-rate-queue-${var.environment}-${local.deployment_timestamp}"
379359
location = var.gcp_region
380360

381361
rate_limits {

0 commit comments

Comments
 (0)