From 11f13a470653dfef5558d65892f9d8ca8a365ff3 Mon Sep 17 00:00:00 2001 From: Diptesh Choudhuri Date: Tue, 29 Oct 2024 09:49:43 +0530 Subject: [PATCH] chore(website): use finally --- apps/website/app/entry.server.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/website/app/entry.server.tsx b/apps/website/app/entry.server.tsx index 1106cf9cd2..9fc1e7c532 100644 --- a/apps/website/app/entry.server.tsx +++ b/apps/website/app/entry.server.tsx @@ -14,15 +14,12 @@ const migrationClient = postgres(serverVariables.DATABASE_URL, { max: 1 }); migrate(drizzle(migrationClient), { migrationsFolder: "app/drizzle/migrations", }) - .then(() => { - migrationClient.end(); - console.log("Database migrations complete"); - }) + .then(() => console.log("Database migrations complete")) .catch((error) => { console.error("Database migrations failed", error); - migrationClient.end(); process.exit(1); - }); + }) + .finally(() => migrationClient.end()); const ABORT_DELAY = 5_000;