Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: 🐛 reupgrade things to node20
Browse files Browse the repository at this point in the history
  • Loading branch information
ecxyzzy committed Dec 10, 2023
1 parent 4b13521 commit b810a5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/api/bronya.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const esbuildOptions: BuildOptions = {
* Shared construct props.
*/
export const constructs: ApiConstructProps = {
functionProps: () => ({ runtime: Runtime.NODEJS_20_X }),
functionPlugin: ({ functionProps, handler }, scope) => {
const warmingTarget = new LambdaFunction(handler, {
event: RuleTargetInput.fromObject(warmingRequestBody),
Expand Down
2 changes: 1 addition & 1 deletion tools/cdk/src/constructs/WebsocProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class WebsocProxy extends Construct {
functionName,
handler: "index.handler",
timeout: Duration.seconds(15),
runtime: Runtime.NODEJS_18_X,
runtime: Runtime.NODEJS_20_X,
memorySize: 512,
}),
{
Expand Down
2 changes: 1 addition & 1 deletion tools/cdk/src/constructs/WebsocScraperV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class WebsocScraperV2 extends Construct {
'var{DescribeTasksCommand:a,ECSClient:e,ListClustersCommand:s,ListTasksCommand:t,StopTaskCommand:n}=require("@aws-sdk/client-ecs");exports.h=async _=>{let d=new e,{clusterArns:i}=await d.send(new s({})),l=i?.filter(a=>a.includes("websoc-scraper-v2"))[0],{taskArns:r}=await d.send(new t({cluster:l})),{tasks:c}=await d.send(new a({cluster:l,tasks:r}));await Promise.all(c?.filter(a=>a.startedAt&&a.startedAt.valueOf()+36e5<Date.now()).map(a=>d.send(new n({cluster:l,task:a.taskArn})))??[])};',
),
handler: "index.h",
runtime: Runtime.NODEJS_18_X,
runtime: Runtime.NODEJS_20_X,
architecture: Architecture.ARM_64,
role: new Role(this, `${id}-auto-restart-role`, {
assumedBy: new ServicePrincipal("lambda.amazonaws.com"),
Expand Down

0 comments on commit b810a5d

Please sign in to comment.