Skip to content

Commit

Permalink
10554: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
En-8 committed Dec 12, 2024
1 parent ac9d2f3 commit 4a2e932
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/env/environments/00-common
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REGION="${DEFAULT_REGION}"
CURRENT_COLOR=$(./scripts/dynamo/get-current-color.sh "${ENV}")
SOURCE_TABLE=$(./scripts/dynamo/get-source-table.sh "${ENV}")
SOURCE_TABLE_VERSION="${SOURCE_TABLE//efcms-${ENV}-/}"
DB_HOST=$(./scripts/postgres/get-host.sh -h -w) # -w for writeable
DB_HOST=$(./scripts/postgres/get-host.sh -h -w)

# region hard-coded; all ES domains and Cognito user pools are in us-east-1
ELASTICSEARCH_ENDPOINT=$(aws es describe-elasticsearch-domain \
Expand Down
2 changes: 1 addition & 1 deletion scripts/postgres/restoreDbFromSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function main() {
}
void main();

export async function describeRDSInstance({
async function describeRDSInstance({
environment,
rdsClient,
useWriter = false,
Expand Down
6 changes: 2 additions & 4 deletions web-api/src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,11 @@ async function createConnection<T>({
throw new Error('token does not exist');
}

const config = {
dbInstances[dbKey] = await connect({
...POOL,
host,
password: token,
};

dbInstances[dbKey] = await connect(config);
});

return await cb(dbInstances[dbKey]!);
} catch (err) {
Expand Down
3 changes: 2 additions & 1 deletion web-api/src/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const environment = {
user: process.env.POSTGRES_USER || 'postgres',
},
readHost: process.env.POSTGRES_READ_HOST!,
useGlobalCert: true,
useGlobalCert:
process.env.NODE_ENV === 'production' || process.env.CIRCLE_BRANCH,
},
region,
s3Endpoint: isLocal
Expand Down

0 comments on commit 4a2e932

Please sign in to comment.