mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-05 14:11:41 -04:00
@@ -880,14 +880,20 @@ def send_notification(service_id, template_id):
|
||||
service_id, job_id=upload_id, include_one_off=True
|
||||
)
|
||||
attempts = 0
|
||||
while notifications["total"] == 0 and attempts < 5:
|
||||
|
||||
# The response can come back in different forms of incompleteness
|
||||
while (
|
||||
notifications["total"] == 0
|
||||
and notifications["notifications"] == []
|
||||
and attempts < 50
|
||||
):
|
||||
notifications = notification_api_client.get_notifications_for_service(
|
||||
service_id, job_id=upload_id, include_one_off=True
|
||||
)
|
||||
time.sleep(0.1)
|
||||
attempts = attempts + 1
|
||||
|
||||
if notifications["total"] == 0 and attempts == 5:
|
||||
if notifications["total"] == 0 and attempts == 50:
|
||||
# This shows the job we auto-generated for the user
|
||||
return redirect(
|
||||
url_for(
|
||||
|
||||
@@ -88,6 +88,8 @@ The below steps rely on you first configuring access to the Terraform state in s
|
||||
terraform plan
|
||||
```
|
||||
|
||||
If the `terraform init` command fails, you may need to run `terraform init -upgrade` to make sure new module versions are picked up.
|
||||
|
||||
1. Apply changes with `terraform apply`.
|
||||
|
||||
1. Remove the space deployer service instance if it doesn't need to be used again, such as when manually running terraform once.
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.15.5"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ locals {
|
||||
}
|
||||
|
||||
module "redis" {
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
@@ -17,7 +17,7 @@ module "redis" {
|
||||
}
|
||||
|
||||
module "logo_upload_bucket" {
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.15.5"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ terraform {
|
||||
key = "admin.tfstate.demo"
|
||||
encrypt = "true"
|
||||
region = "us-gov-west-1"
|
||||
profile = "notify-terraform-backend"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ data "cloudfoundry_space" "dev" {
|
||||
}
|
||||
|
||||
module "logo_upload_bucket" {
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.50.7"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ if [[ ! -s "secrets.auto.tfvars" ]]; then
|
||||
fi
|
||||
|
||||
echo "Importing terraform state for $username"
|
||||
terraform init
|
||||
terraform init -upgrade
|
||||
|
||||
key_name=$username-admin-dev-key
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ locals {
|
||||
}
|
||||
|
||||
module "redis" {
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
@@ -17,7 +17,7 @@ module "redis" {
|
||||
}
|
||||
|
||||
module "logo_upload_bucket" {
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
@@ -50,7 +50,7 @@ module "api_network_route" {
|
||||
# https://cloud.gov/docs/services/external-domain-service/#how-to-create-an-instance-of-this-service
|
||||
###########################################################################
|
||||
module "domain" {
|
||||
source = "github.com/18f/terraform-cloudgov//domain?ref=v0.5.2"
|
||||
source = "github.com/18f/terraform-cloudgov//domain?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.15.5"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ terraform {
|
||||
key = "admin.tfstate.prod"
|
||||
encrypt = "true"
|
||||
region = "us-gov-west-1"
|
||||
profile = "notify-terraform-backend"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ locals {
|
||||
}
|
||||
|
||||
module "redis" {
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
@@ -17,7 +17,7 @@ module "redis" {
|
||||
}
|
||||
|
||||
module "logo_upload_bucket" {
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.15.5"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ terraform {
|
||||
key = "admin.tfstate.sandbox"
|
||||
encrypt = "true"
|
||||
region = "us-gov-west-1"
|
||||
profile = "notify-terraform-backend"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "~> 0.15"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ locals {
|
||||
}
|
||||
|
||||
module "redis" {
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//redis?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
@@ -17,7 +17,7 @@ module "redis" {
|
||||
}
|
||||
|
||||
module "logo_upload_bucket" {
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.2.0"
|
||||
source = "github.com/18f/terraform-cloudgov//s3?ref=v0.7.1"
|
||||
|
||||
cf_org_name = local.cf_org_name
|
||||
cf_space_name = local.cf_space_name
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
cloudfoundry = {
|
||||
source = "cloudfoundry-community/cloudfoundry"
|
||||
version = "0.15.5"
|
||||
version = "0.53.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ terraform {
|
||||
key = "admin.tfstate.stage"
|
||||
encrypt = "true"
|
||||
region = "us-gov-west-1"
|
||||
profile = "notify-terraform-backend"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user