Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Align with comments
Reginald Bondoca3609b9b6fd6
diff --git a/.github/workflows/check-be-pull-request.yml b/.github/workflows/check-be-pull-request.ymlindex ebda38eff3..8022a25bc4 100644--- a/.github/workflows/check-be-pull-request.yml+++ b/.github/workflows/check-be-pull-request.yml@@ -1,7 +1,6 @@name: "Check Backend Pull Request"on:- workflow_dispatch: # remove mepull_request:types: [opened, synchronize]paths:diff --git a/backend/src/services/database.ts b/backend/src/services/database.tsindex b28195ab20..5fc4955f19 100644--- a/backend/src/services/database.ts+++ b/backend/src/services/database.ts@@ -5,11 +5,6 @@ export const initDatabase = (MONGO_URL: string) => {mongoose.connect(MONGO_URL).then(() => console.log('Successfully connected to DB'))- .catch((e) => {- console.log('Failed to connect to DB ', e);- setTimeout(() => {- console.log(e);- }, 5000);- });+ .catch((e) => console.log('Failed to connect to DB ', e));return mongoose.connection;};diff --git a/backend/src/services/health.ts b/backend/src/services/health.tsindex 95fef514ff..b4ab2a97b0 100644--- a/backend/src/services/health.ts+++ b/backend/src/services/health.ts@@ -6,14 +6,14 @@ export const setUpHealthEndpoint = <T>(server: T) => {const onSignal = () => {console.log('Server is starting clean-up');return Promise.all([- () => {+ new Promise((resolve) => {if (mongoose.connection && mongoose.connection.readyState == 1) {- mongoose.connection.close();- () => {- console.info('Database connection closed');- };+ mongoose.connection.close()+ .then(() => resolve('Database connection closed'));+ } else {+ resolve('Database connection already closed');}- }+ })]);};