diff --git a/infra/terraform/environments/dev/main.tf b/infra/terraform/environments/dev/main.tf index c9d6c9be95..28d53d4c64 100644 --- a/infra/terraform/environments/dev/main.tf +++ b/infra/terraform/environments/dev/main.tf @@ -253,22 +253,27 @@ module "service" { { name = "clean-up-variations", commands = ["batch:clean-up-variations"], + timeout = 43200, }, { name = "cns", commands = ["batch:cns"], + timeout = 43200, }, { name = "create-psv-licence-surrender-task", commands = ["batch:create-psv-licence-surrender-task"], + timeout = 43200, }, { name = "psv-operator-list-export", commands = ["batch:data-gov-uk-export", "-v", "--report-name=psv-operator-list", "--path=/tmp/"], + timeout = 43200, }, { name = "international-goods-export", commands = ["batch:data-gov-uk-export", "-v", "--report-name=international-goods", "--path=/tmp/"], + timeout = 43200, }, { name = "data-retention-populate", @@ -293,22 +298,27 @@ module "service" { { name = "digital-continuation-reminders", commands = ["batch:digital-continuation-reminders"], + timeout = 43200, }, { name = "duplicate-vehicle-warning", commands = ["batch:duplicate-vehicle-warning"], + timeout = 43200, }, { - name = "enqueue-ch-compare" + name = "enqueue-ch-compare", commands = ["batch:enqueue-ch-compare"], + timeout = 1800, }, { name = "expire-bus-registration", commands = ["batch:expire-bus-registration"], + timeout = 43200, }, { name = "flag-urgent-tasks", commands = ["batch:flag-urgent-tasks"], + timeout = 1800, }, { name = "import-users-from-csv", @@ -317,18 +327,22 @@ module "service" { { name = "inspection-request-email", commands = ["batch:inspection-request-email"], + timeout = 1800, }, { name = "interim-end-date-enforcement", commands = ["batch:interim-end-date-enforcement"], + timeout = 43200, }, { name = "last-tm-letter", commands = ["batch:last-tm-letter"], + timeout = 43200, }, { name = "licence-status-rules", commands = ["batch:licence-status-rules"], + timeout = 1800, }, { name = "process-cl", @@ -337,18 +351,22 @@ module "service" { { name = "process-inbox", commands = ["batch:process-inbox"], + timeout = 43200, }, { name = "process-ntu", commands = ["batch:process-ntu"], + timeout = 43200, }, { name = "remove-read-audit", commands = ["batch:remove-read-audit"], + timeout = 43200, }, { name = "resolve-payments", commands = ["batch:resolve-payments"], + timeout = 150, }, { name = "system-parameter", @@ -361,66 +379,82 @@ module "service" { { name = "close-expired-windows", commands = ["permits:close-expired-windows"], + timeout = 43200, }, { name = "mark-expired-permits", commands = ["permits:mark-expired-permits"], + timeout = 43200, }, { name = "process-queue-general", commands = ["queue:process-queue", "--exclude", "que_typ_ch_compare,que_typ_create_gds_vehicle_list,que_typ_create_psv_vehicle_list,que_typ_disc_printing,que_typ_print,que_typ_disc_printing_print,que_typ_create_com_lic,que_typ_remove_deleted_docs,que_typ_permit_generate,que_typ_permit_print,que_typ_run_ecmt_scoring,que_typ_accept_ecmt_scoring,que_typ_irhp_permits_allocate"], + timeout = 90, }, { name = "process-queue-community-licences", commands = ["queue:process-queue", "--type", "que_typ_create_com_lic"], + timeout = 90, }, { name = "process-queue-disc-generation", commands = ["queue:process-queue", "--type", "que_typ_create_gds_vehicle_list,que_typ_create_psv_vehicle_list,que_typ_disc_printing"], + timeout = 90, }, { name = "process-queue-disc-print", commands = ["queue:process-queue", "--type", "que_typ_disc_printing_print", "--queue-duration", "840"], + timeout = 850, }, { name = "process-queue-ecmt-accept", commands = ["queue:process-queue", "--type", "que_typ_accept_ecmt_scoring"], + timeout = 90, }, { name = "process-queue-irhp-allocate", commands = ["queue:process-queue", "--type", "que_typ_run_ecmt_scoring"], + timeout = 90, }, { name = "process-queue-permit-generation", commands = ["queue:process-queue", "--type", "que_typ_permit_generate"], + timeout = 90, }, { name = "process-queue-permit-print", commands = ["queue:process-queue", "--type", "que_typ_permit_print", "--queue-duration", "840"], + timeout = 850, }, { name = "process-queue-print", commands = ["queue:process-queue", "--type", "que_typ_print"], + timeout = 90, }, { name = "process-company-profile", commands = ["queue:process-company-profile"], + timeout = 150, }, { name = "company-profile-dlq", commands = ["queue:company-profile-dlq"], + timeout = 900, }, { name = "process-insolvency", commands = ["queue:process-insolvency"], + timeout = 900, }, { name = "process-insolvency-dlq", commands = ["queue:process-insolvency-dlq"], + timeout = 900, }, { name = "transxchange-consumer", commands = ["queue:transxchange-consumer"], + timeout = 90, }, ] } diff --git a/infra/terraform/modules/service/README.md b/infra/terraform/modules/service/README.md index 128afefda8..616adc5162 100644 --- a/infra/terraform/modules/service/README.md +++ b/infra/terraform/modules/service/README.md @@ -45,7 +45,7 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [assets\_version](#input\_assets\_version) | The version of the assets | `string` | n/a | yes | -| [batch](#input\_batch) | Configuration for the batch process |
object({| n/a | yes | +| [batch](#input\_batch) | Configuration for the batch process |
version = string
repository = string
subnet_ids = list(string)
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
jobs = list(object({
name = string
commands = list(string)
cpu = optional(number, 1)
memory = optional(number, 2048)
}))
})
object({| n/a | yes | | [domain\_name](#input\_domain\_name) | The domain name for the environment | `string` | n/a | yes | | [environment](#input\_environment) | The environment to deploy to | `string` | n/a | yes | | [services](#input\_services) | The services to deploy |
version = string
repository = string
subnet_ids = list(string)
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
jobs = list(object({
name = string
commands = list(string)
cpu = optional(number, 1)
memory = optional(number, 2048)
timeout = optional(number, 300)
}))
})
map(object({| `{}` | no | diff --git a/infra/terraform/modules/service/batch.tf b/infra/terraform/modules/service/batch.tf index 59a3b3c7fc..b02f8d1dde 100644 --- a/infra/terraform/modules/service/batch.tf +++ b/infra/terraform/modules/service/batch.tf @@ -71,7 +71,7 @@ locals { } }) - attempt_duration_seconds = 60 + attempt_duration_seconds = job.timeout retry_strategy = local.default_retry_policy } } } diff --git a/infra/terraform/modules/service/variables.tf b/infra/terraform/modules/service/variables.tf index d55c13bb60..5e92c8e488 100644 --- a/infra/terraform/modules/service/variables.tf +++ b/infra/terraform/modules/service/variables.tf @@ -57,6 +57,7 @@ variable "batch" { commands = list(string) cpu = optional(number, 1) memory = optional(number, 2048) + timeout = optional(number, 300) })) }) }
version = string
repository = string
cpu = number
memory = number
task_iam_role_statements = list(object({
effect = string
actions = list(string)
resources = list(string)
}))
add_cdn_url_to_env = optional(bool, false)
lb_listener_arn = string
listener_rule_priority = optional(number, 10)
listener_rule_host_header = optional(string, "*")
security_group_ids = list(string)
subnet_ids = list(string)
vpc_id = optional(string, null)
}))