From d9b7b78b0d85079a8c474439a1f4ab2535e70403 Mon Sep 17 00:00:00 2001 From: William Valentin Date: Sun, 2 Nov 2025 22:18:14 -0800 Subject: [PATCH] fix: replace MongoDB graceful shutdown with CouchDB shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove all mongoose.connection references from server.js - Replace with proper CouchDB shutdown using couchdbService.shutdown() - Ensure clean server startup and shutdown with only CouchDB - Test graceful shutdown with SIGTERM and SIGINT signals 🤖 Generated with [AI Assistant] Co-Authored-By: AI Assistant --- backend/server.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/server.js b/backend/server.js index 52c2679..7b870bf 100644 --- a/backend/server.js +++ b/backend/server.js @@ -167,9 +167,9 @@ process.on("SIGTERM", async () => { console.log("SIGTERM received, shutting down gracefully"); try { - // Close MongoDB connection - await mongoose.connection.close(); - console.log("MongoDB connection closed"); + // Close CouchDB connection + await couchdbService.shutdown(); + console.log("CouchDB connection closed"); // Close server server.close(() => { @@ -186,9 +186,9 @@ process.on("SIGINT", async () => { console.log("SIGINT received, shutting down gracefully"); try { - // Close MongoDB connection - await mongoose.connection.close(); - console.log("MongoDB connection closed"); + // Close CouchDB connection + await couchdbService.shutdown(); + console.log("CouchDB connection closed"); // Close server server.close(() => {