Skip to content

Commit

Permalink
DO-1652: run lint fix and add cache queue name prop
Browse files Browse the repository at this point in the history
  • Loading branch information
gowrizrh committed May 13, 2024
1 parent 742ffce commit f739447
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 10 additions & 3 deletions packages/prerender-fargate/lib/prerender-fargate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export class PrerenderFargate extends Construct {

const cluster = new ecs.Cluster(this, `${prerenderName}-cluster`, {
vpc: vpc,
clusterName: props.clusterName !== undefined ? props.clusterName : undefined
clusterName:
props.clusterName !== undefined ? props.clusterName : undefined,
});

const directory = path.join(__dirname, "prerender");
Expand Down Expand Up @@ -163,10 +164,16 @@ export class PrerenderFargate extends Construct {
containerPort: 3000,
environment,
secrets,
family: props.taskDefinitionFamilyName !== undefined ? props.taskDefinitionFamilyName : undefined,
family:
props.taskDefinitionFamilyName !== undefined
? props.taskDefinitionFamilyName
: undefined,
},
publicLoadBalancer: true,
loadBalancerName: props.loadBalancerName !== undefined ? props.loadBalancerName : undefined,
loadBalancerName:
props.loadBalancerName !== undefined
? props.loadBalancerName
: undefined,
assignPublicIp: true,
listenerPort: 443,
redirectHTTP: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ export interface PrerenderRecacheApiOptions {
* { "tokenABC": "https://URL_A,https://URL_B,...", ..., "tokenXYZ":"https://URL_Y,https://URL_Z" }
*/
tokenSecret: string;

/**
* A name for the recache queue
*
* @default CloudFormation-generated name
*/
queueName?: string;
}

/**
Expand Down Expand Up @@ -83,7 +90,11 @@ export class PrerenderRecacheApi extends Construct {
timeout: Duration.seconds(120),
}),
deployDeadLetterQueue: false,
queueProps: { visibilityTimeout: Duration.minutes(60) },
queueProps: {
visibilityTimeout: Duration.minutes(60),
queueName:
options.queueName !== undefined ? options.queueName : undefined,
},
});
}
}
Expand Down

0 comments on commit f739447

Please sign in to comment.