Skip to content

Commit

Permalink
Merge branch 'main' into tsh/bump-rum-sample-rates
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerHendrickson authored Dec 21, 2023
2 parents a33ebcd + 9716bbd commit fe4c566
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/server/src/lib/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function sendGrantAssignedNotficationForAgency(assignee_agency, grantDetai
const emailHTML = module.exports.addBaseBranding(grantAssignedBody, {
tool_name: 'Grants Identification Tool',
title: 'Grants Assigned Notification',
notifications_url: `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
notifications_url: (process.env.ENABLE_MY_PROFILE === 'true') ? `${process.env.WEBSITE_DOMAIN}/my-profile` : `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
});

// TODO: add plain text version of the email
Expand Down Expand Up @@ -238,7 +238,7 @@ async function sendGrantDigest({
const emailHTML = module.exports.addBaseBranding(formattedBody, {
tool_name: 'Federal Grant Finder',
title: 'New Grants Digest',
notifications_url: `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
notifications_url: (process.env.ENABLE_MY_PROFILE === 'true') ? `${process.env.WEBSITE_DOMAIN}/my-profile` : `${process.env.WEBSITE_DOMAIN}/grants?manageSettings=true`,
});

// TODO: add plain text version of the email
Expand Down Expand Up @@ -304,7 +304,7 @@ async function buildAndSendUserSavedSearchGrantDigest(userId, openDate) {

await asyncBatch(inputs, getAndSendGrantForSavedSearch, 2);

console.log(`Successfully built and sent grants digest emails for ${openDate}`);
console.log(`Successfully built and sent grants digest emails for ${inputs.length} saved searches on ${openDate}`);
}

async function buildAndSendGrantDigest() {
Expand Down
1 change: 1 addition & 0 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ module "api" {
enable_grants_scraper = var.api_enable_grants_scraper
enable_grants_digest = var.api_enable_grants_digest
enable_new_team_terminology = var.api_enable_new_team_terminology
enable_my_profile = var.api_enable_my_profile
enable_saved_search_grants_digest = var.api_enable_saved_search_grants_digest
unified_service_tags = local.unified_service_tags
datadog_environment_variables = var.api_datadog_environment_variables
Expand Down
1 change: 1 addition & 0 deletions terraform/modules/gost_api/task.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module "api_container_definition" {
ENABLE_SAVED_SEARCH_GRANTS_DIGEST = var.enable_saved_search_grants_digest ? "true" : "false"
ENABLE_GRANTS_SCRAPER = "false"
ENABLE_NEW_TEAM_TERMINOLOGY = var.enable_new_team_terminology ? "true" : "false"
ENABLE_MY_PROFILE = var.enable_my_profile ? "true" : "false"
GRANTS_SCRAPER_DATE_RANGE = 7
GRANTS_SCRAPER_DELAY = 1000
NODE_OPTIONS = "--max_old_space_size=1024"
Expand Down
6 changes: 6 additions & 0 deletions terraform/modules/gost_api/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ variable "enable_new_team_terminology" {
default = false
}

variable "enable_my_profile" {
description = "When true, sets the ENABLE_MY_PROFILE environment variable to true in the API container."
type = bool
default = false
}

variable "enable_saved_search_grants_digest" {
description = "When true, sets the ENABLE_SAVED_SEARCH_GRANTS_DIGEST environment variable to true in the API container."
type = bool
Expand Down
1 change: 1 addition & 0 deletions terraform/prod.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ api_maximum_task_count = 5
api_enable_grants_scraper = false
api_enable_grants_digest = false
api_enable_new_team_terminology = false
api_enable_my_profile = false
api_enable_saved_search_grants_digest = true
api_log_retention_in_days = 30
api_datadog_environment_variables = {
Expand Down
1 change: 1 addition & 0 deletions terraform/sandbox.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ api_maximum_task_count = 5
api_enable_grants_scraper = false
api_enable_grants_digest = false
api_enable_new_team_terminology = false
api_enable_my_profile = true
api_enable_saved_search_grants_digest = false
api_log_retention_in_days = 7

Expand Down
1 change: 1 addition & 0 deletions terraform/staging.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ api_maximum_task_count = 5
api_enable_grants_scraper = false
api_enable_grants_digest = false
api_enable_new_team_terminology = true
api_enable_my_profile = true
api_enable_saved_search_grants_digest = true
api_log_retention_in_days = 14
api_datadog_environment_variables = {
Expand Down
4 changes: 4 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ variable "api_enable_new_team_terminology" {
type = bool
}

variable "api_enable_my_profile" {
type = bool
}

variable "api_enable_saved_search_grants_digest" {
type = bool
}
Expand Down

0 comments on commit fe4c566

Please sign in to comment.